/**
 * Registration Modal Styles
 *
 * Styles for the "Register Your Interest" modal and button.
 *
 * @package AA_Metrics
 * @since 1.7.0
 */

/* ============================================
   BUTTON STYLES
   ============================================ */

.aa-register-button {
    display: inline-block;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.aa-register-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.aa-register-button:active {
    transform: translateY(0);
}

.aa-register-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.3);
}

/* ============================================
   MODAL OVERLAY
   ============================================ */

.aa-register-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.aa-register-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: aaModalFadeIn 0.3s ease;
}

/* ============================================
   MODAL CONTENT
   ============================================ */

.aa-register-modal-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: aaModalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.aa-register-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.aa-register-modal-close:hover {
    background: #9C27B0;
    color: #fff;
    transform: rotate(90deg);
}

/* ============================================
   MODAL HEADER
   ============================================ */

.aa-register-modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #eee;
}

.aa-register-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
}

/* ============================================
   FORM STYLES
   ============================================ */

.aa-register-form {
    padding: 30px;
}

.aa-register-field {
    margin-bottom: 20px;
}

.aa-register-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.aa-register-field label .required {
    color: #dc3545;
}

.aa-register-field input[type="text"],
.aa-register-field input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.4;
    color: #1d2327;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.aa-register-field input:focus {
    outline: none;
    border-color: #9C27B0;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
}

.aa-register-field input::placeholder {
    color: #999;
}

/* Honeypot field - hidden */
.aa-register-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* ============================================
   MESSAGE & VALIDATION
   ============================================ */

.aa-register-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.aa-register-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.aa-register-message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.aa-register-actions {
    margin-top: 24px;
}

.aa-register-submit {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #9C27B0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aa-register-submit:hover {
    background: #7B1FA2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.aa-register-submit:active {
    transform: translateY(0);
}

.aa-register-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.aa-register-submit.loading {
    position: relative;
    color: transparent;
}

.aa-register-submit.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aaSpinner 0.8s linear infinite;
}

/* ============================================
   SUCCESS STATE
   ============================================ */

.aa-register-success {
    padding: 50px 30px;
    text-align: center;
}

.aa-register-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #9C27B0;
    color: #fff;
    font-size: 40px;
    border-radius: 50%;
    animation: aaSuccessPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aa-register-success h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
}

.aa-register-success p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes aaModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes aaSuccessPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .aa-register-modal {
        padding: 15px;
    }

    .aa-register-modal-content {
        border-radius: 12px;
    }

    .aa-register-modal-header {
        padding: 24px 20px 16px;
    }

    .aa-register-modal-header h2 {
        font-size: 20px;
    }

    .aa-register-form {
        padding: 20px;
    }

    .aa-register-field input[type="text"],
    .aa-register-field input[type="email"] {
        padding: 12px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}
