/**
 * JoomShopping Auth Module - Styles
 * Premium V2 Styles (migrated from demofilesdownload plugin)
 */

:root {
    --jshopping-auth-brand-gradient: linear-gradient(270deg, #E04C74, #E15A53, #E04C74);
    --jshopping-auth-accent: #DF4979;
    --jshopping-auth-border: #ebebeb;
    --jshopping-auth-text: #666666;
    --jshopping-auth-bg-input: #f9f9f9;
}

/* Modal Styling */
#jshopping-auth-modal .modal-dialog {
    max-width: 480px;
}

#jshopping-auth-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    background: #fff;
    position: relative;
}

#jshopping-auth-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--jshopping-auth-brand-gradient);
    z-index: 10;
}

#jshopping-auth-modal .modal-header {
    background: #fff;
    border-bottom: none;
    padding: 1.5rem 1.5rem 0.5rem;
    position: relative;
    display: flex;
    justify-content: center;
}

#jshopping-auth-modal .modal-title {
    color: #2c3e50;
    font-weight: 800;
    font-size: 1.4rem;
    text-align: center;
}

#jshopping-auth-modal .btn-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    opacity: 0.3;
    transition: 0.3s;
    background-color: transparent;
    border: none;
}

#jshopping-auth-modal .btn-close:hover {
    opacity: 1;
}

#jshopping-auth-modal .modal-body {
    padding: 1rem 2rem 2.5rem;
}

/* Intro Styles */
.jshopping-auth-intro-text p {
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 1.5rem;
}

.jshopping-auth-btn-stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Form Components */
.jshopping-auth-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.jshopping-auth-input-wrapper i {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 1.1rem;
    transition: 0.3s;
    pointer-events: none;
    z-index: 5;
}

#jshopping-auth-modal .form-control {
    width: 100%;
    padding: 0.75rem 1.2rem;
    padding-left: 2.8rem;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--jshopping-auth-bg-input);
    color: #333;
}

#jshopping-auth-modal .form-control:focus {
    border-color: var(--jshopping-auth-accent);
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(223, 73, 121, 0.1);
    outline: none;
}

.jshopping-auth-input-wrapper .form-control:focus+i {
    color: var(--jshopping-auth-accent);
}

/* Validation States */
#jshopping-auth-modal .form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

#jshopping-auth-modal .form-control.is-valid {
    border-color: #28a745;
    background-image: none;
}

#jshopping-auth-modal .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.15);
}

#jshopping-auth-modal .form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.15);
}

/* Invalid Feedback */
#jshopping-auth-modal .invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    padding-left: 0.5rem;
}

#jshopping-auth-modal .form-control.is-invalid~.invalid-feedback {
    display: block;
}

/* Field Hints */
.jshopping-auth-field-hint {
    color: #888;
    font-size: 0.75rem;
    margin-top: 0.3rem;
    padding-left: 0.5rem;
}

.jshopping-auth-input-wrapper .form-control.is-invalid+i+.invalid-feedback+.jshopping-auth-field-hint {
    display: none;
}

/* Checkbox Validation */
#jshopping-auth-modal .form-check-input.is-invalid {
    border-color: #dc3545;
}

#jshopping-auth-modal .form-check-input.is-invalid~.invalid-feedback {
    display: block;
}

/* Custom Buttons */
.btn-jshopping-auth-primary {
    background: var(--jshopping-auth-brand-gradient);
    border: none;
    color: white !important;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(224, 76, 116, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.btn-jshopping-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 76, 116, 0.4);
}

/* Success button state */
.btn-jshopping-auth-primary.btn-success-state {
    background: #2ecc71;
    /* Green */
    box-shadow: none;
}

.btn-jshopping-auth-outline {
    background: transparent;
    border: 2px solid var(--jshopping-auth-border);
    color: #555 !important;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
}

.btn-jshopping-auth-outline:hover {
    border-color: var(--jshopping-auth-accent);
    color: var(--jshopping-auth-accent) !important;
    background: #fff;
}

.btn-jshopping-auth-back {
    color: #999 !important;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    transition: 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    width: auto !important;
}

.btn-jshopping-auth-back:hover {
    color: var(--jshopping-auth-accent) !important;
}

/* User Exists Screen */
.jshopping-auth-user-exists-icon {
    width: 80px;
    height: 80px;
    background: #F0F7FF;
    color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.2rem;
    position: relative;
}

.jshopping-auth-user-exists-icon::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    background: #2ecc71;
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
}

/* Username Exists Screen - Orange Warning Icon */
.jshopping-auth-username-exists-icon {
    width: 80px;
    height: 80px;
    background: #FFF4E6;
    color: #f39c12;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.2rem;
    position: relative;
}

.jshopping-auth-username-exists-icon .warning-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
}

/* Centered Success Overlay */
.jshopping-auth-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.jshopping-auth-success-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.jshopping-auth-success-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-top: 5px solid #2ecc71;
}

.jshopping-auth-success-overlay.active .jshopping-auth-success-card {
    transform: translateY(0);
}

.success-icon-large {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #E8F8F0, #D1F2EB);
    color: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

/* Alerts */
.jshopping-auth-alert {
    background-color: #FFF5F7;
    border-left: 4px solid #dc3545;
    color: #a71d2a;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Success Alerts */
#jshopping-auth-modal .alert-success {
    background-color: #E8F8F0;
    border-left: 4px solid #28a745;
    border-radius: 8px;
    color: #155724;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
}

#jshopping-auth-modal .alert-success i {
    color: #28a745;
}

/* Loading spinner animation */
@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: fa-spin 1s infinite linear;
}

/* Promo Gift Screen Styles */
.jshopping-auth-promo-gift-container {
    padding-top: 1rem;
}

.jshopping-auth-promo-gift-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #FFF0F5, #ffeaf1);
    color: var(--jshopping-auth-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.8rem;
    box-shadow: 0 10px 30px rgba(223, 73, 121, 0.15);
    animation: jshopping-auth-float 3s ease-in-out infinite;
}

@keyframes jshopping-auth-float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.jshopping-auth-promo-code-wrapper {
    background-color: #fcfcfc;
    border: 2px dashed var(--jshopping-auth-accent);
    border-radius: 12px;
    padding: 1.2rem;
    margin: 1.5rem 0;
    position: relative;
}

.jshopping-auth-promo-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 600;
}

.jshopping-auth-promo-code-text {
    font-family: monospace;
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
    letter-spacing: 1px;
}

.jshopping-auth-promo-description {
    color: #555;
    line-height: 1.5;
}

/* Mobile Adjustments */
@media (max-width: 576px) {
    #jshopping-auth-modal .modal-body {
        padding: 1.5rem;
    }
}