/* Welcome Back Plugin - Feedback Form Styles */
/* COMPLETE VERSION: Professional styling with animations and responsive design */

#wbp-feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(2px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#wbp-feedback-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
    border: 1px solid #e1e1e1;
}

@keyframes slideIn {
    from { 
        transform: translateY(-30px) scale(0.9); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

#wbp-feedback-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#wbp-feedback-close:hover {
    color: #333;
    background: #f5f5f5;
}

.wbp-feedback-title {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.wbp-feedback-text {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.5;
    text-align: center;
    font-size: 15px;
}

.wbp-rating {
    display: flex;
    gap: 8px;
    margin: 25px 0;
    justify-content: center;
    padding: 10px 0;
}

.wbp-star {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    padding: 5px;
    border-radius: 4px;
}

.wbp-star:hover {
    color: #ffc107;
    transform: scale(1.1);
    background: rgba(255, 193, 7, 0.1);
}

.wbp-star.active {
    color: #ffc107;
    text-shadow: 0 0 8px rgba(255, 193, 7, 0.3);
}

.wbp-feedback-field {
    margin: 20px 0;
}

.wbp-feedback-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

#wbp-feedback-comment {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: all 0.2s ease;
    background: #fafafa;
    box-sizing: border-box;
}

#wbp-feedback-comment:focus {
    outline: none;
    border-color: #007cba;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#wbp-feedback-comment::placeholder {
    color: #999;
    font-style: italic;
}

.wbp-feedback-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    justify-content: flex-end;
}

#wbp-feedback-submit,
#wbp-feedback-skip {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 100px;
    position: relative;
}

#wbp-feedback-submit {
    background: #007cba;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

#wbp-feedback-submit:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

#wbp-feedback-submit:active:not(:disabled) {
    transform: translateY(0);
}

#wbp-feedback-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#wbp-feedback-skip {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e1e1e1;
}

#wbp-feedback-skip:hover {
    background: #e9ecef;
    color: #333;
    border-color: #d1d1d1;
}

#wbp-feedback-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    display: none;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

#wbp-feedback-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#wbp-feedback-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading state for submit button */
#wbp-feedback-submit:disabled::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Mobile responsive design */
@media (max-width: 600px) {
    #wbp-feedback-form {
        margin: 20px;
        padding: 25px 20px;
        max-width: none;
    }
    
    .wbp-feedback-title {
        font-size: 20px;
    }
    
    .wbp-star {
        font-size: 28px;
        gap: 6px;
    }
    
    .wbp-feedback-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    #wbp-feedback-submit,
    #wbp-feedback-skip {
        width: 100%;
        padding: 14px 20px;
    }
}

@media (max-width: 400px) {
    #wbp-feedback-form {
        margin: 15px;
        padding: 20px 15px;
    }
    
    .wbp-star {
        font-size: 24px;
        gap: 4px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    #wbp-feedback-overlay,
    #wbp-feedback-form,
    .wbp-star,
    #wbp-feedback-submit,
    #wbp-feedback-message {
        animation: none;
        transition: none;
    }
    
    .wbp-star:hover {
        transform: none;
    }
    
    #wbp-feedback-submit:hover:not(:disabled) {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #wbp-feedback-form {
        border: 2px solid #000;
    }
    
    #wbp-feedback-comment {
        border-color: #000;
    }
    
    #wbp-feedback-submit {
        border: 1px solid #000;
    }
}