/* Animation for fading in the modal overlay */
@keyframes npsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes npsSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Overlay with glassmorphism */
#nps-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999 !important;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

#nps-modal.active {
    opacity: 1;
}

/* Modal Container/Card */
#nps-modal > div {
    background: #ffffff !important;
    padding: 32px 28px !important;
    max-width: 520px;
    width: 90% !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    position: relative;
    box-sizing: border-box !important;
    opacity: 0;
    transform: translateY(25px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease-out;
}

#nps-modal.active > div {
    opacity: 1;
    transform: translateY(0);
}

/* Close Button */
.nps-close-btn {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
}

.nps-close-btn:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    transform: scale(1.05);
}

/* Survey Form Elements */
#nps-form, #nps-inline-form {
    color: #1e293b !important;
    font-family: inherit;
}

.nps-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 4px 0 !important;
    text-align: center !important;
    line-height: 1.4 !important;
}

.nps-subtitle {
    font-size: 13px !important;
    color: #64748b !important;
    margin: 0 0 20px 0 !important;
    text-align: center !important;
    font-weight: 400 !important;
}

/* NPS Radio Buttons Container */
.nps-container {
    display: flex !important;
    gap: 5px !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin: 16px 0 24px 0 !important;
    box-sizing: border-box !important;
}

.nps-container input[type='radio'] {
    display: none !important;
}

/* Custom Radio Labels (0-10) */
.nps-container label {
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    min-width: 24px !important;
    max-width: 38px !important;
    border-radius: 50% !important; /* Perfect circle! */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Overriding parent themes or library default radio behaviors */
input[type="radio"] + label:before, 
input[type="checkbox"] + label:before, 
.wpcf7-list-item-label.wpcf7-list-item-right:before {
    display: none !important;
    content: '' !important;
}

/* Grayscale hover scale */
.nps-container label:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    transform: scale(1.15) translateY(-2px);
}

/* Checked States - Grayscale to Black Gradient */
.nps-container input[type='radio']:checked + label {
    transform: scale(1.2) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 10 !important;
}

/* 0 to 3: Light Grays */
.nps-container input[type='radio']:checked + label.nps-0,
.nps-container input[type='radio']:checked + label.nps-1,
.nps-container input[type='radio']:checked + label.nps-2,
.nps-container input[type='radio']:checked + label.nps-3 {
    background: #cbd5e1 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* 4 to 6: Medium Grays */
.nps-container input[type='radio']:checked + label.nps-4,
.nps-container input[type='radio']:checked + label.nps-5,
.nps-container input[type='radio']:checked + label.nps-6 {
    background: #64748b !important;
    border-color: #64748b !important;
    color: #ffffff !important;
}

/* 7 to 8: Dark Grays */
.nps-container input[type='radio']:checked + label.nps-7,
.nps-container input[type='radio']:checked + label.nps-8 {
    background: #334155 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

/* 9 to 10: Solid Black */
.nps-container input[type='radio']:checked + label.nps-9,
.nps-container input[type='radio']:checked + label.nps-10 {
    background: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}

/* Form Groups & Textareas */
.nps-form-group {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 20px !important;
    text-align: left !important;
}

.nps-form-group label {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    margin-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.nps-required-badge {
    font-size: 11px !important;
    color: #475569 !important;
    text-transform: none !important;
    font-weight: 600 !important;
    background: #e2e8f0 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    letter-spacing: normal !important;
}

.nps-form-group textarea {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    background: #f8fafc !important;
    resize: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    min-height: 80px !important;
    line-height: 1.5 !important;
}

.nps-form-group textarea:focus {
    outline: none !important;
    border-color: #000000 !important; /* Pure Black Focus Border */
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1) !important;
}

/* Submit Button - Strictly Black & White */
.nps-submit-btn {
    width: 100% !important;
    border: none !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    background: #000000 !important; /* Pure Black */
    color: #ffffff !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.nps-submit-btn:hover {
    background: #222222 !important; /* Dark Grey Hover */
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.nps-submit-btn:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

.nps-submit-btn:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Inline Container Specific overrides */
#nps-inline-container {
    background: #ffffff !important;
    padding: 28px !important;
    max-width: 520px !important;
    width: 100% !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
    margin: 24px auto !important;
    box-sizing: border-box !important;
}

/* Message Styles */
#nps-message, #nps-inline-message {
    margin-top: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
}
