﻿/* ============================================================
   AL AMEEN — CREATIVE AUTH MODALS
   File: Content/aa-modal.css
   Scope: .aa-modal only (login & register). No site CSS conflict.
   ============================================================ */

/* ---------- Backdrop ---------- */
.modal-backdrop.show {
    background: #0a1628;
    opacity: .72;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ---------- Dialog & Content ---------- */
.aa-modal .modal-dialog {
    max-width: 960px;
    padding-left: 15px;
    padding-right: 15px;
}

.aa-modal .modal-content {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 40px 100px rgba(10, 22, 40, .45), 0 0 0 1px rgba(212, 175, 106, .18);
}

/* Entrance animation */
.aa-modal.fade .modal-dialog {
    transform: scale(.94) translateY(24px);
    transition: transform .38s cubic-bezier(.2, .8, .2, 1);
}

.aa-modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Split layout */
.aa-modal-split {
    display: grid;
    grid-template-columns: 44% 56%;
    min-height: 580px;
}

/* ============================================================
   LEFT — NAVY VISUAL PANEL
   ============================================================ */
.aa-modal-visual {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 34px;
    background: radial-gradient(600px circle at 20% 10%, rgba(30, 48, 84, .85), transparent 55%), linear-gradient(135deg, #0a1628 0%, #142236 55%, #0a1628 100%);
    color: #f4f1e8;
    text-align: center;
}

/* Islamic geometric pattern */
.aa-modal-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23d4af6a' stroke-width='0.6' opacity='0.14'%3E%3Cpath d='M40 8 L52 28 L72 40 L52 52 L40 72 L28 52 L8 40 L28 28 Z'/%3E%3Ccircle cx='40' cy='40' r='10'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
    pointer-events: none;
    opacity: .8;
    -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 80%);
    mask-image: radial-gradient(circle at center, #000 30%, transparent 80%);
}

/* Gold aurora glow */
.aa-modal-glow {
    position: absolute;
    bottom: -100px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 106, .35), transparent 62%);
    filter: blur(30px);
    z-index: 0;
    pointer-events: none;
    animation: aaModalFloat 12s ease-in-out infinite;
}

@keyframes aaModalFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, -20px) scale(1.15);
    }
}

/* Twinkling particles */
.aa-modal-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 18% 22%, rgba(230, 194, 122, .7) 1.5px, transparent 1.5px), radial-gradient(circle at 82% 18%, rgba(230, 194, 122, .5) 1px, transparent 1px), radial-gradient(circle at 30% 78%, rgba(230, 194, 122, .55) 1.5px, transparent 1.5px), radial-gradient(circle at 68% 62%, rgba(230, 194, 122, .4) 1px, transparent 1px), radial-gradient(circle at 88% 88%, rgba(230, 194, 122, .6) 1.5px, transparent 1.5px), radial-gradient(circle at 12% 60%, rgba(230, 194, 122, .45) 1px, transparent 1px), radial-gradient(circle at 55% 32%, rgba(230, 194, 122, .5) 1px, transparent 1px);
    animation: aaModalTwinkle 4.5s ease-in-out infinite alternate;
}

@keyframes aaModalTwinkle {
    0% {
        opacity: .35;
    }

    100% {
        opacity: .9;
    }
}

/* Close button */
.aa-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(212, 175, 106, .35);
    border-radius: 50%;
    background: rgba(10, 22, 40, .4);
    color: #d4af6a;
    font-size: 13px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all .3s ease;
}

    .aa-modal-close:hover,
    .aa-modal-close:focus-visible {
        background: #d4af6a;
        color: #0a1628;
        border-color: #d4af6a;
        transform: rotate(90deg) scale(1.08);
        outline: none;
    }

/* Visual content */
.aa-modal-visual-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.aa-modal-logo {
    width: 76px;
    height: auto;
    filter: drop-shadow(0 0 14px rgba(212, 175, 106, .45));
    animation: aaModalLogoPulse 3.5s ease-in-out infinite;
}

@keyframes aaModalLogoPulse {
    0%, 100% {
        filter: drop-shadow(0 0 14px rgba(212, 175, 106, .45));
    }

    50% {
        filter: drop-shadow(0 0 24px rgba(212, 175, 106, .7));
    }
}

.aa-modal-welcome {
    margin: 0;
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
    color: #f4f1e8;
    letter-spacing: -.01em;
    text-wrap: balance;
}

    .aa-modal-welcome em {
        display: inline-block;
        margin-top: 4px;
        font-style: italic;
        background: linear-gradient(100deg, #f7e3b0, #d4af6a 55%, #a8853f);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

.aa-modal-lead {
    margin: 0;
    max-width: 260px;
    color: #b8c2d6;
    font-size: 13.5px;
    line-height: 1.65;
}

.aa-modal-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(212, 175, 106, .55);
    border-radius: 999px;
    background: rgba(212, 175, 106, .08);
    color: #e3cb9c;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
    transition: all .3s ease;
}

    .aa-modal-switch i {
        font-size: 11px;
        transition: transform .3s ease;
    }

    .aa-modal-switch:hover {
        background: #d4af6a;
        color: #0a1628;
        border-color: #d4af6a;
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(212, 175, 106, .3);
    }

        .aa-modal-switch:hover i {
            transform: translateX(2px);
        }

.aa-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 106, .22);
    background: rgba(255, 255, 255, .04);
    color: #b8c2d6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

    .aa-modal-badge i {
        color: #d4af6a;
        font-size: 11px;
    }

/* ============================================================
   RIGHT — IVORY FORM PANEL
   ============================================================ */
.aa-modal-form {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
    background: linear-gradient(180deg, #ffffff 0%, #faf6ed 100%);
    color: #142236;
}

    .aa-modal-form::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, transparent, #d4af6a 20%, #c6a15b 50%, #d4af6a 80%, transparent);
        opacity: .7;
    }

.aa-modal-form-inner {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.aa-modal-form-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.aa-modal-form-seal {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e3cb9c, #c6a15b);
    color: #142236;
    font-size: 20px;
    box-shadow: 0 10px 24px rgba(198, 161, 91, .3);
}

.aa-modal-title {
    margin: 0;
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    color: #0a1628;
}

.aa-modal-sub {
    margin: 4px 0 0;
    color: #6b7488;
    font-size: 13px;
    line-height: 1.5;
}

/* ---------- Floating label fields ---------- */
.aa-field {
    position: relative;
    margin-bottom: 16px;
}

.aa-field-input {
    width: 100%;
    height: 58px;
    padding: 24px 44px 8px 16px;
    border: 1px solid #e8dfc9;
    border-radius: 12px;
    background: #ffffff;
    color: #142236;
    font-family: 'Poppins', 'Plus Jakarta Sans', sans-serif;
    font-size: 14.5px;
    outline: none;
    transition: all .25s ease;
}

    .aa-field-input:hover {
        border-color: #d4af6a;
    }

    .aa-field-input:focus {
        border-color: #c6a15b;
        box-shadow: 0 0 0 4px rgba(198, 161, 91, .18);
    }

.aa-field-label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #8a8f9c;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    transition: all .2s ease;
}

.aa-field-input:focus + .aa-field-label,
.aa-field-input:not(:placeholder-shown) + .aa-field-label {
    top: 12px;
    transform: none;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #a8853f;
}

.aa-field-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: #b9b9c4;
    font-size: 14px;
    pointer-events: none;
    transition: color .25s ease;
}

.aa-field-input:focus ~ .aa-field-icon {
    color: #c6a15b;
}

.aa-field-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #b9b9c4;
    font-size: 13px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .25s ease;
}

    .aa-field-toggle:hover {
        background: rgba(198, 161, 91, .12);
        color: #a8853f;
    }

/* ---------- Remember + Forgot ---------- */
.aa-row-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.aa-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

    .aa-check input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .aa-check span {
        position: relative;
        display: inline-block;
        width: 18px;
        height: 18px;
        border: 1.5px solid #b9b9c4;
        border-radius: 5px;
        background: #ffffff;
        transition: all .25s ease;
    }

        .aa-check span::after {
            content: "";
            position: absolute;
            top: 2px;
            left: 5px;
            width: 5px;
            height: 9px;
            border: solid #142236;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg) scale(0);
            transition: transform .2s ease;
        }

    .aa-check input:checked + span {
        background: #d4af6a;
        border-color: #d4af6a;
    }

        .aa-check input:checked + span::after {
            transform: rotate(45deg) scale(1);
        }

    .aa-check em {
        font-style: normal;
        color: #37475e;
        font-size: 13px;
        font-weight: 600;
    }

.aa-link {
    color: #a8853f;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color .25s ease;
}

    .aa-link:hover {
        color: #0a1628;
        text-decoration: underline;
    }

/* ---------- Submit button ---------- */
.aa-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    padding: 0 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #e3cb9c 0%, #c6a15b 55%, #a8853f 100%);
    color: #0a1628;
    font-family: 'Poppins', 'Plus Jakarta Sans', sans-serif;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(198, 161, 91, .3);
    transition: all .3s ease;
}

    .aa-submit i {
        transition: transform .25s ease;
    }

    .aa-submit:hover,
    .aa-submit:focus-visible {
        transform: translateY(-2px);
        box-shadow: 0 20px 44px rgba(198, 161, 91, .42);
        outline: none;
    }

        .aa-submit:hover i {
            transform: translateX(4px);
        }

/* ---------- Divider ---------- */
.aa-divider {
    position: relative;
    margin: 26px 0 18px;
    text-align: center;
}

    .aa-divider::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, #e8dfc9 20%, #e8dfc9 80%, transparent);
    }

    .aa-divider span {
        position: relative;
        display: inline-block;
        padding: 0 14px;
        background: #faf6ed;
        color: #8a8f9c;
        font-size: 11.5px;
        font-weight: 700;
        letter-spacing: .14em;
        text-transform: uppercase;
    }

/* ---------- Social buttons ---------- */
.aa-social {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.aa-social-btn {
    display: grid;
    place-items: center;
    height: 46px;
    border: 1px solid #e8dfc9;
    border-radius: 12px;
    background: #ffffff;
    color: #37475e;
    font-size: 16px;
    text-decoration: none;
    transition: all .25s ease;
}

    .aa-social-btn:hover {
        transform: translateY(-2px);
        border-color: transparent;
        color: #ffffff;
        box-shadow: 0 10px 22px rgba(10, 22, 40, .16);
    }

.aa-social-google:hover {
    background: #ea4335;
}

.aa-social-facebook:hover {
    background: #1877f2;
}

.aa-social-github:hover {
    background: #24292e;
}

.aa-social-linkedin:hover {
    background: #0a66c2;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767.98px) {
    .aa-modal .modal-dialog {
        margin: 12px;
    }

    .aa-modal-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .aa-modal-visual {
        padding: 44px 24px 36px;
        border-radius: 24px 24px 0 0;
    }

    .aa-modal-form {
        padding: 32px 24px 36px;
        border-radius: 0 0 24px 24px;
    }

    .aa-modal-close {
        top: 14px;
        right: 14px;
    }

    .aa-modal-welcome {
        font-size: 24px;
    }

    .aa-modal-logo {
        width: 60px;
    }

    .aa-modal-form-inner {
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    .aa-modal-visual {
        padding: 36px 20px 28px;
    }

    .aa-modal-welcome {
        font-size: 22px;
    }

    .aa-modal-lead {
        font-size: 12.5px;
    }

    .aa-modal-form {
        padding: 28px 20px 32px;
    }

    .aa-modal-form-head {
        gap: 12px;
    }

    .aa-modal-form-seal {
        width: 42px;
        height: 42px;
        font-size: 17px;
    }

    .aa-modal-title {
        font-size: 22px;
    }

    .aa-field-input {
        height: 54px;
    }

    .aa-submit {
        height: 50px;
        font-size: 13px;
    }

    .aa-social-btn {
        height: 42px;
        font-size: 14px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .aa-modal *,
    .aa-modal *::before,
    .aa-modal *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
