/* 
 * ПодборPRO Feedback Widget Styles
 * Using project variables from assets/css/variables.css
 */

/* Trigger Button */
.ppro-fb-trigger {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF3600 0%, #FF5E33 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05), 0 4px 20px rgba(255, 54, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 250ms cubic-bezier(0, 0, 0.2, 1);
    border: none;
    font-family: 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ppro-fb-trigger:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 6px 25px rgba(255, 54, 0, 0.4);
}

.ppro-fb-trigger svg {
    color: #FFFFFF;
    transition: all 250ms ease;
}

.ppro-fb-trigger:hover svg {
    transform: rotate(15deg);
}

/* Pulse Wave Animation */
.ppro-fb-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgb(255 108 219 / 60%);
    animation: pproPulseWave 2s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes pproPulseWave {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Modal Overlay */
.ppro-fb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.8);
    display: none;
    z-index: 1000;
}

.ppro-fb-modal.ppro-fb-modal--show {
    display: block;
}

/* Modal Content */
.ppro-fb-modal-content {
    position: absolute;
    bottom: 100px;
    right: 24px;
    background: #1F1F25;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 380px;
    max-width: calc(100vw - 48px);
    transform: translateX(20px) translateY(10px);
    transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
    font-family: 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ppro-fb-modal.ppro-fb-modal--show .ppro-fb-modal-content {
    transform: translateX(0) translateY(0);
}

/* Modal Header */
.ppro-fb-modal-header {
    background: linear-gradient(135deg, #FF3600 0%, #FF5E33 100%);
    color: #FFFFFF;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.ppro-fb-modal-close {
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    padding: 8px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 250ms cubic-bezier(0, 0, 0.2, 1);
}

.ppro-fb-modal-close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.ppro-fb-modal-close svg {
    color: #FFFFFF;
    transition: color 250ms ease;
}

/* Style for main modal close button */
.ppro-fb-close {
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    padding: 8px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 250ms cubic-bezier(0, 0, 0.2, 1);
}

.ppro-fb-close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.ppro-fb-close svg {
    color: #FFFFFF;
    transition: color 250ms ease;
}

/* Modal Body */
.ppro-fb-modal-body {
    padding: 0;
}

/* Contact Options */
.ppro-fb-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 250ms ease;
    border: none;
    width: 100%;
    background: none;
    text-align: left;
    font-family: inherit;
    border-bottom: 1px solid #252525;
}

.ppro-fb-option:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.ppro-fb-option:hover {
    background-color: #252525;
}

.ppro-fb-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.ppro-fb-option--phone .ppro-fb-option-icon {
    background-color: #FF3600;
    color: #FFFFFF;
}

.ppro-fb-option--telegram .ppro-fb-option-icon {
    background-color: #3B82F6;
    color: #FFFFFF;
}

.ppro-fb-option--callback .ppro-fb-option-icon {
    background-color: #5C5C5C;
    color: #FFFFFF;
}

.ppro-fb-option-content {
    flex: 1;
    color: #FFFFFF;
}

.ppro-fb-option-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.ppro-fb-option-subtitle {
    font-size: 14px;
    color: #B5B5B5;
    margin: 0;
    line-height: 1.3;
}

.ppro-fb-option-arrow {
    color: #8A8A8A;
    margin-left: 12px;
    transition: transform 250ms ease;
}

.ppro-fb-option:hover .ppro-fb-option-arrow {
    transform: translateX(4px);
}

/* Callback Form - Modern Full-Size */
.ppro-fb-callback-form {
    padding: 0;
    background: #FFFFFF;
    border-radius: 0 0 12px 12px;
    display: none;
    min-height: 280px;
}

.ppro-fb-callback-form.ppro-fb-callback-form--open {
    display: block;
    animation: slideDown 300ms ease-out;
}

.ppro-fb-callback-form-inner {
    padding: 32px 24px 24px;
    position: relative;
}

.ppro-fb-callback-form h3 {
    font-family: 'Roboto Flex', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1F1F25;
    margin: 0 0 24px 0;
    text-align: center;
}

/* Modern Floating Label Form Groups */
.ppro-fb-form-group {
    margin-bottom: 24px;
    position: relative;
}

.ppro-fb-form-group:last-of-type {
    margin-bottom: 24px;
}

.ppro-fb-form-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 400;
    color: #8A8A8A;
    font-family: 'Roboto Flex', sans-serif;
    transition: all 250ms cubic-bezier(0, 0, 0.2, 1);
    pointer-events: none;
    background: #FFFFFF;
    padding: 0 4px;
    z-index: 2;
}

.ppro-fb-form-input {
    width: 100%;
    padding: 18px 16px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    background: #FFFFFF;
    color: #1F1F25;
    font-size: 16px;
    font-family: 'Roboto Flex', sans-serif;
    transition: all 250ms ease;
    box-sizing: border-box;
    outline: none;
    position: relative;
    z-index: 1;
}

/* Floating label states */
.ppro-fb-form-input:focus + .ppro-fb-form-label,
.ppro-fb-form-input:not(:placeholder-shown) + .ppro-fb-form-label,
.ppro-fb-form-input.ppro-fb-has-value + .ppro-fb-form-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 500;
    color: #FF3600;
}

.ppro-fb-form-input:focus {
    border-color: #FF3600;
    box-shadow: 0 0 0 3px rgba(255, 54, 0, 0.1);
}

/* Placeholder styling */
.ppro-fb-form-input::placeholder {
    color: transparent;
}

.ppro-fb-form-input:focus::placeholder {
    color: transparent;
}

.ppro-fb-form-submit {
    width: 100%;
    background: linear-gradient(135deg, #FF3600 0%, #FF5E33 100%);
    color: #FFFFFF;
    border: none;
    padding: 18px 24px;
    border-radius: 12px;
    font-family: 'Roboto Flex', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 250ms ease;
    box-shadow: 0 4px 12px rgba(255, 54, 0, 0.2);
}

.ppro-fb-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 54, 0, 0.3);
}

.ppro-fb-form-submit:active {
    transform: translateY(0);
}

/* Beautiful Close Button for Callback Form */
.ppro-fb-callback-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: #F5F5F5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 250ms ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ppro-fb-callback-close:hover {
    background: #E5E5E5;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ppro-fb-callback-close svg {
    width: 16px;
    height: 16px;
    color: #666666;
    transition: color 250ms ease;
}

.ppro-fb-callback-close:hover svg {
    color: #FF3600;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 250ms ease;
    font-family: inherit;
}

.ppro-fb-form-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05), 0 4px 15px rgba(255, 54, 0, 0.3);
}

.ppro-fb-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ppro-fb-form-submit.ppro-fb-btn--loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

.ppro-fb-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    white-space: pre-line;
}

.ppro-fb-message--success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ppro-fb-message--error {
    background: rgba(220, 38, 38, 0.1);
    color: #DC2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Form Messages */
.ppro-fb-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.ppro-fb-form-message--success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ppro-fb-form-message--error {
    background: rgba(220, 38, 38, 0.1);
    color: #DC2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Back Button */
.ppro-fb-form-back {
    background: none;
    border: none;
    color: #B5B5B5;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 16px;
    transition: color 250ms ease;
    font-family: inherit;
}

.ppro-fb-form-back:hover {
    color: #FF3600;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 300px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .ppro-fb-trigger {
        width: 56px;
        height: 56px;
        bottom: 70px;
        right: 16px;
    }
    
    .ppro-fb-modal {
        padding: 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .ppro-fb-modal-content {
        left: 16px;
        right: 16px;
        bottom: max(16px, env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        margin: 0;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px - env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .ppro-fb-modal-header {
        padding: 16px;
        font-size: 15px;
    }
    
    .ppro-fb-option {
        padding: 14px 16px;
    }
    
    .ppro-fb-option-icon {
        width: 44px;
        height: 44px;
        margin-right: 14px;
    }
    
    .ppro-fb-option-title {
        font-size: 15px;
    }
    
    .ppro-fb-option-subtitle {
        font-size: 13px;
    }
    
    .ppro-fb-callback-form {
        padding: 0;
        min-height: 0;
    }

    .ppro-fb-callback-form-inner {
        padding: 24px 16px 16px;
    }
    
    .ppro-fb-form-input {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .ppro-fb-form-submit {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .ppro-fb-trigger,
    .ppro-fb-modal-content,
    .ppro-fb-option,
    .ppro-fb-form-input,
    .ppro-fb-form-submit {
        transition: none;
    }
    
    .ppro-fb-modal.ppro-fb-modal--open,
    .ppro-fb-modal-content,
    .ppro-fb-callback-form.ppro-fb-callback-form--open {
        animation: none;
    }
    
    .ppro-fb-trigger::before {
        animation: none;
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ppro-fb-modal-content {
        border: 2px solid #FFFFFF;
    }
    
    .ppro-fb-form-input {
        border: 2px solid #FFFFFF;
    }
    
    .ppro-fb-form-input:focus {
        border-color: #FF3600;
        box-shadow: 0 0 0 2px #FF3600;
    }
}
