/* Login Popup Overlay */
.login-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(36, 36, 36, 0.6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;

    &.active {
        display: flex;
        opacity: 1;
    }
}

/* Login Popup Modal */
.login-popup-modal {
    background-color: #DDDCE5;
    width: 90%;
    max-width: 927px;
    min-height: 474px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Zalando Sans', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Close Button */
.login-popup-close {
    position: absolute;
    top: 13px;
    right: 14px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 30px;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    font-family: inherit;
    transition: background 0.2s;

    &:hover {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* Content Container */
.login-popup-content {
    display: flex;
    flex-direction: row;
    padding: 32px 0 0 0;
    flex-grow: 1;
    position: relative;
}

/* Sections */
.login-popup-section {
    flex: 1;
    padding: 24px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    position: relative;

    &:first-child {
        border-right: 1px solid rgba(0, 0, 0, 0.5);
    }

    h5 {
        font-family: 'Zalando Sans', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 20px;
        line-height: 140%;
        color: #000000;
        margin: 0;
    }

    p {
        font-family: 'Zalando Sans', sans-serif;
        font-style: normal;
        font-weight: 300;
        font-size: 16px;
        line-height: 140%;
        color: #000000;
        margin-top: 8px;
        margin-bottom: 24px;

        &.small {
            margin-bottom: auto;
        }
    }
}

/* Form Elements */
.login-form-group {
    margin-bottom: 16px;
    position: relative;

    label {
        display: block;
        font-family: 'Zalando Sans', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 14px;
        line-height: 140%;
        color: #000000;
        margin-bottom: 5px;
    }

    input {
        box-sizing: border-box;
        width: 307px;
        max-width: 100%;
        height: 35px;
        background: rgba(255, 255, 255, 0.75);
        border: 1px solid #000000;
        border-radius: 30px;
        padding: 0 16px;
        font-size: 12px;
        color: #000;
        font-family: 'Zalando Sans', sans-serif;
        transition: border-color 0.2s;

        &::placeholder {
            color: #000;
            opacity: 0.3;
        }
    }

    /* Error state */
    &.has-error label {
        color: #C60000;
    }

    &.has-error input {
        border-color: #C60000;
    }
}

/* Action Row */
.login-action-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

/* Action Button */
.btn-popup-action {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 9px 16px;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 30px;
    border: none;
    color: #FFFFFF;
    font-family: 'Zalando Sans', sans-serif;
    font-size: 14px;
    font-weight: 400 !important;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;

    &:hover {
        background-color: rgba(0, 0, 0, 0.7);
    }
}

/* Messages */
.login-message,
.register-message {
    font-size: 12px !important;
    margin: 0 !important;
    min-height: 1em !important;
    line-height: 1.4 !important;

    &:empty {
        display: none;
    }
}

/* Footer */
.login-popup-footer {
    background: #000000;
    width: 100%;
    height: auto;
    min-height: 98px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    box-sizing: border-box;
    margin-top: auto;
}

.login-popup-footer-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    p {
        color: #FFFFFF;
        margin: 0;
        font-family: 'Zalando Sans', sans-serif;

        &:first-child {
            font-weight: 300;
            font-size: 16px;
            letter-spacing: -0.02em;
        }

        &:nth-child(2) {
            font-weight: 400;
            font-size: 14px;
            opacity: 0.5;
            margin-top: 4px;
        }
    }
}

/* Support Email Button */
.btn-support-email {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    gap: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    border-radius: 30px;
    border: none;
    color: #000000;
    font-size: 14px;
    font-family: 'Zalando Sans', sans-serif;
    cursor: pointer;
    transition: background 0.2s;

    &:hover {
        background: rgba(255, 255, 255, 1);
    }
}

/* Copy Tooltip */
.copy-tooltip {
    position: fixed;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10000;

    &.show {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .login-popup-modal {
        width: 95%;
        height: auto;
        min-height: auto;
    }

    .login-popup-content {
        flex-direction: column-reverse;
        padding-top: 20px;
    }

    .login-popup-section {
        padding: 24px 0 !important;
        margin: 0 24px !important;

        &:first-child {
            border-right: none;
        }

        &:last-child {
            border-bottom: 1px solid rgba(0, 0, 0, 0.5);
            padding-bottom: 30px;
        }

        &.login-popup-left {
            margin-bottom: 8px !important;
        }
    }

    .login-popup-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .btn-support-email {
        justify-content: center;
        width: 60% !important;
        gap: 2px !important;
    }

    .login-popup-close {
        top: 16px;
        right: 16px;
    }
}