/* NV User Insights Modal Styles */

/* Material Symbols lock icon styling */
.lock-icon {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 1.5em;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Prevent locked buttons from showing underlines on hover */
a.btn.-locked.nv-modal-trigger {
    text-decoration: none;
}

a.btn.-locked.nv-modal-trigger:hover {
    text-decoration: none;
}

.nv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nv-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.nv-modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.nv-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.nv-modal-close {
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.nv-modal-close:hover {
    color: #333;
    background-color: #e9ecef;
}

.nv-modal-body {
    padding: 25px;
}

/* Form styling within modal */
.nv-modal .nv-user-form {
    margin: 0;
}

.nv-modal .nv-form-field {
    margin-bottom: 20px;
}

.nv-modal .nv-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.nv-modal .nv-form-field input[type="text"],
.nv-modal .nv-form-field input[type="email"],
.nv-modal .nv-form-field input[type="password"],
.nv-modal .nv-form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.nv-modal .nv-form-field input:focus,
.nv-modal .nv-form-field select:focus {
    outline: none;
    border-color: #4765ff;
    box-shadow: 0 0 0 3px rgba(71, 101, 255, 0.1);
}

.nv-modal .nv-submit-button {
    width: 100%;
    padding: 12px;
    background-color: #4765ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nv-modal .nv-submit-button:hover {
    background-color: #3651e6;
}

.nv-modal .nv-form-messages {
    margin-bottom: 15px;
}

.nv-modal .nv-success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
}

.nv-modal .nv-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

/* Lock icon styling */

.btn.-locked {
    opacity: 0.8;
    position: relative;
}

/* Modal trigger button styling */
.nv-modal-trigger {
    cursor: pointer;
    transition: all 0.2s ease;
}

.nv-modal-trigger:hover {
    transform: translateY(-1px);
}

/* Responsive styles */
@media (max-width: 768px) {
    .nv-modal-content {
        width: 95%;
        margin: 10px;
    }

    .nv-modal-header {
        padding: 15px 20px;
    }

    .nv-modal-body {
        padding: 20px;
    }

    .nv-modal-header h3 {
        font-size: 1.1rem;
    }
}

/* Animation for modal close */
.nv-modal.closing {
    animation: modalSlideOut 0.3s ease-in forwards;
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
}

/* Message Styles */
.nv-form-messages {
    margin-bottom: 20px;
}

.nv-error,
.nv-success {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid;
}

.nv-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.nv-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.nv-error a,
.nv-success a {
    color: inherit;
    text-decoration: underline;
}

.nv-error a:hover,
.nv-success a:hover {
    text-decoration: none;
}

/* Form validation styles */
.nv-form-field.error input,
.nv-form-field.error select {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.nv-form-field.error .field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.field-error.checking {
    color: #6c757d;
    font-style: italic;
}

.field-error.checking::before {
    content: "⏳ ";
    margin-right: 4px;
}

.nv-submit-button {
    margin: 12px 0;
    border-radius: 6px;
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.nv-submit-button:hover {
    background-color: #005177;
}

.margin {
    &__top {
        &--small {
            margin-top: 8px;
        }

        &--medium {
            margin-top: 16px;
        }

        &--large {
            margin-top: 24px;
        }
    }

    &__bottom {
        &--small {
            margin-bottom: 8px;
        }

        &--medium {
            margin-bottom: 16px;
        }

        &--large {
            margin-bottom: 24px;
        }
    }
}

/* Two-part registration form styles */
.nv-modal .nv-form-field--checkbox {
    margin-bottom: 15px;
}

.nv-modal .nv-form-field--checkbox label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}

.nv-modal .nv-form-field--checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Radio button styling */
.nv-modal .radio-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 400;
    cursor: pointer;
}

.nv-modal .radio-option input[type="radio"] {
    width: auto;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Checkbox options for multiple selections */
.nv-modal .checkbox-option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    font-weight: 400;
    cursor: pointer;
}

.nv-modal .checkbox-option input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Other field styling */
.nv-modal .other-field {
    margin-top: 10px;
    margin-left: 20px;
}

.nv-modal .other-field input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-style: italic;
}

.nv-modal .other-field input[type="text"]:focus {
    outline: none;
    border-color: #4765ff;
    box-shadow: 0 0 0 2px rgba(71, 101, 255, 0.1);
}

/* Required field indicator */
.nv-modal .required {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
}

/* Form step progress indicator */
.nv-form-step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 10px;
}

.nv-form-step {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.nv-form-step.active {
    color: #4765ff;
    font-weight: 600;
}

.nv-form-step.completed {
    color: #28a745;
}

.nv-form-step::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ddd;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: bold;
}

.nv-form-step.active::before {
    background-color: #4765ff;
    content: '2';
}

.nv-form-step.completed::before {
    background-color: #28a745;
    content: '✓';
}

.nv-form-step:first-child::before {
    content: '1';
}

.nv-form-step:first-child.completed::before {
    content: '✓';
}

/* Loading state */
.nv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    color: #666;
    font-style: italic;
}

.nv-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #4765ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Back arrow styling */
.nv-back-arrow {
    background: none;
    border: none;
    font-size: 1.2em;
    color: #666;
    cursor: pointer;
    padding: 0;
    margin-right: 10px;
    line-height: 1;
    transition: color 0.2s ease;
    vertical-align: baseline;
}

.nv-back-arrow:hover {
    color: #333;
    background: none;
}

.nv-back-arrow:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Ensure h3 with back arrow displays properly */
.nv-user-registration-form-wrapper h3 {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nv-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .nv-modal-header,
    .nv-modal-body {
        padding: 20px;
    }
    
    .nv-modal .other-field {
        margin-left: 10px;
    }
    
    .nv-back-arrow {
        font-size: 1.1em;
        margin-right: 8px;
    }
}