/**
 * Iberico Club — Magic Login page styles
 * Premium design matching Ibérico Club brand identity
 */

/* Fonts: Gordita (sans) and Aleo (serif) are loaded by the theme */

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */

.woocommerce-account .woocommerce {
    max-width: 100%;
}

/* Hide any leftover WooCommerce default elements */
.woocommerce-account:not(.logged-in) .woocommerce>h2,
.woocommerce-account:not(.logged-in) .u-columns,
.woocommerce-account:not(.logged-in) .col2-set {
    display: none !important;
}

/* ═══════════════════════════════════════════
   WRAPPER
   ═══════════════════════════════════════════ */

.icml-login-wrapper {
    max-width: 440px;
    margin: 48px auto 80px;
    padding: 0 24px;
    font-family: 'Gordita', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ═══════════════════════════════════════════
   CARD
   ═══════════════════════════════════════════ */

.icml-login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 40px 40px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 12px 32px rgba(0, 0, 0, 0.06),
        0 32px 64px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

/* Subtle gold top accent line */
.icml-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #C5A55A 0%, #D4B96E 50%, #C5A55A 100%);
}

/* ═══════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════ */

.icml-title {
    font-family: 'Aleo', Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 8px;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}

.icml-subtitle {
    font-family: 'Gordita', sans-serif;
    font-size: 14px;
    color: #8a8a8a;
    text-align: center;
    margin: 0 0 32px;
    line-height: 1.6;
    font-weight: 400;
}

/* ═══════════════════════════════════════════
   INPUT GROUPS
   ═══════════════════════════════════════════ */

.icml-input-group {
    margin-bottom: 20px;
}

.icml-input-group label {
    display: block;
    font-family: 'Gordita', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.icml-input-group input[type="email"],
.icml-input-group input[type="password"],
.icml-input-group input[type="text"] {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e2e2e2;
    border-radius: 10px;
    font-family: 'Gordita', sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    background: #fafaf9;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.icml-input-group input:hover {
    border-color: #ccc;
}

.icml-input-group input:focus {
    border-color: #C5A55A;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.1);
}

.icml-input-group input::placeholder {
    color: #b0b0b0;
    font-weight: 300;
}

/* ═══════════════════════════════════════════
   PRIMARY BUTTON: MAGIC LINK
   ═══════════════════════════════════════════ */

.icml-btn-magic {
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Gordita', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.icml-btn-magic::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

.icml-btn-magic:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.icml-btn-magic:hover::after {
    left: 100%;
}

.icml-btn-magic:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.icml-btn-magic:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.icml-btn-magic svg {
    opacity: 0.9;
}

/* ═══════════════════════════════════════════
   SENT STATE
   ═══════════════════════════════════════════ */

.icml-sent {
    text-align: center;
    padding: 24px 0 8px;
    animation: icml-fadeIn 0.4s ease;
}

.icml-check-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    animation: icml-scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icml-sent h3 {
    font-family: 'Aleo', Georgia, serif;
    font-size: 20px;
    margin: 0 0 10px;
    color: #1a1a1a;
    font-weight: 600;
}

.icml-sent p {
    font-family: 'Gordita', sans-serif;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.icml-resend {
    margin-top: 20px !important;
    font-size: 13px !important;
    color: #aaa !important;
}

.icml-resend a {
    color: #C5A55A;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.icml-resend a:hover {
    color: #b3943f;
}

/* ═══════════════════════════════════════════
   LOADING
   ═══════════════════════════════════════════ */

.icml-loading {
    text-align: center;
    padding: 24px 0;
    animation: icml-fadeIn 0.3s ease;
}

.icml-loading p {
    font-family: 'Gordita', sans-serif;
    font-size: 14px;
    color: #888;
    position: relative;
}

.icml-loading p::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #e0e0e0;
    border-top-color: #C5A55A;
    border-radius: 50%;
    animation: icml-spin 0.7s linear infinite;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════
   ERROR MESSAGE
   ═══════════════════════════════════════════ */

.icml-error-msg {
    background: linear-gradient(135deg, #FFF5F5, #FFF0F0);
    color: #C62828;
    font-family: 'Gordita', sans-serif;
    font-size: 13px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 16px;
    line-height: 1.5;
    border: 1px solid rgba(198, 40, 40, 0.08);
    animation: icml-shake 0.4s ease;
}

/* ═══════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════ */

.icml-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    gap: 16px;
}

.icml-divider::before,
.icml-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e5e5, transparent);
}

.icml-divider::before {
    background: linear-gradient(90deg, transparent, #e5e5e5);
}

.icml-divider::after {
    background: linear-gradient(90deg, #e5e5e5, transparent);
}

.icml-divider span {
    font-family: 'Gordita', sans-serif;
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════
   SOCIAL BUTTONS
   ═══════════════════════════════════════════ */

.icml-social-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
}

.icml-social-buttons > form {
    flex: 1;
    display: flex;
}

.icml-btn-social {
    width: 100%;
    padding: 14px 20px;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Gordita', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.icml-btn-social:hover {
    border-color: #d0d0d0;
    background: #fafaf9;
    color: #1a1a1a;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.icml-btn-social:active {
    transform: translateY(0);
}

.icml-btn-social svg {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   PASSWORD TOGGLE
   ═══════════════════════════════════════════ */

.icml-password-toggle {
    text-align: center;
    margin-top: 24px;
}

.icml-password-toggle a {
    font-family: 'Gordita', sans-serif;
    font-size: 13px;
    color: #aaa;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.icml-password-toggle a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #C5A55A;
    transition: width 0.3s ease;
}

.icml-password-toggle a:hover {
    color: #C5A55A;
}

.icml-password-toggle a:hover::after {
    width: 100%;
}

/* ═══════════════════════════════════════════
   PASSWORD SECTION
   ═══════════════════════════════════════════ */

.icml-password-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    animation: icml-slideDown 0.3s ease;
}

.icml-forgot-link {
    text-align: right;
    margin-bottom: 20px;
}

.icml-forgot-link a {
    font-family: 'Gordita', sans-serif;
    font-size: 13px;
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.icml-forgot-link a:hover {
    color: #C5A55A;
}

/* ═══════════════════════════════════════════
   SECONDARY BUTTON: PASSWORD LOGIN
   ═══════════════════════════════════════════ */

.icml-btn-password {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #C5A55A 0%, #D4B96E 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Gordita', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.icml-btn-password::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.icml-btn-password:hover {
    background: linear-gradient(135deg, #b3943f 0%, #C5A55A 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(197, 165, 90, 0.3);
}

.icml-btn-password:hover::after {
    left: 100%;
}

.icml-btn-password:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

.icml-footer-note {
    text-align: center;
    margin-top: 28px;
    font-family: 'Gordita', sans-serif;
    font-size: 12px;
    color: #b0b0b0;
    line-height: 1.7;
}

.icml-footer-note a {
    color: #C5A55A;
    text-decoration: none;
    transition: color 0.2s ease;
}

.icml-footer-note a:hover {
    color: #b3943f;
}

/* ═══════════════════════════════════════════
   WOO NOTICES (errors / success within card)
   ═══════════════════════════════════════════ */

.icml-login-card .woocommerce-notices-wrapper .woocommerce-error,
.icml-login-card .woocommerce-notices-wrapper .woocommerce-message {
    font-family: 'Gordita', sans-serif;
    font-size: 13px;
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
}

.icml-login-card .woocommerce-notices-wrapper .woocommerce-error {
    background: #FFF5F5;
    border-left: 3px solid #C62828;
    color: #C62828;
}

.icml-login-card .woocommerce-notices-wrapper .woocommerce-message {
    background: #F0FFF4;
    border-left: 3px solid #2E7D32;
    color: #2E7D32;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes icml-fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes icml-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes icml-slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes icml-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes icml-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-4px);
    }

    40% {
        transform: translateX(4px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(2px);
    }
}

/* Page-load animation for the card */
.icml-login-card {
    animation: icml-cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes icml-cardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 480px) {
    .icml-login-wrapper {
        margin: 32px auto 60px;
        padding: 0 16px;
    }

    .icml-login-card {
        padding: 36px 28px 32px;
        border-radius: 14px;
    }

    .icml-title {
        font-size: 24px;
    }

    .icml-social-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .icml-social-buttons > form {
        width: 100%;
    }

    .icml-btn-social {
        width: 100%;
        padding: 15px 20px;
    }

    .icml-btn-social {
        padding: 14px 20px;
    }
}

@media (max-width: 360px) {
    .icml-login-card {
        padding: 32px 22px 28px;
    }
}
/* -------------------------------------------
   MODAL / OVERLAY SPECIFIC OVERRIDES
   ------------------------------------------- */

.icml-is-modal {
    margin: 0;
    padding: 0;
    min-height: auto;
    width: 100%;
}

.icml-is-modal .icml-login-card {
    /* Keep the shadow and padding, but remove max-width constraints to fit the modal wrapper */
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.icml-is-modal .icml-title {
    font-size: 24px;
}

.icml-is-modal .icml-subtitle {
    margin-bottom: 24px;
}

