/**
 * M4H Auth Popup Stylesheet
 */

.m4h-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.m4h-auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

.m4h-auth-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 16px;
}

.m4h-auth-overlay.active .m4h-auth-container {
    transform: translateY(0) scale(1);
}

.m4h-auth-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.m4h-auth-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.m4h-auth-header {
    padding: 20px 24px 0 24px;
    background: #ffffff;
}

.m4h-auth-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    gap: 16px;
}

.m4h-auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.m4h-auth-tab-btn.active {
    color: #d9261c;
}

.m4h-auth-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #d9261c;
    border-radius: 2px;
}

.m4h-auth-body {
    padding: 24px;
}

.m4h-auth-tab-content {
    display: none;
}

.m4h-auth-tab-content.active {
    display: block;
    animation: m4hFadeIn 0.3s ease;
}

@keyframes m4hFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.m4h-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.m4h-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.m4h-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.m4h-form-group .required {
    color: #dc2626;
}

.m4h-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.m4h-switch-to-forgot {
    font-size: 12px;
    color: #d9261c;
    text-decoration: none;
    font-weight: 500;
}

.m4h-switch-to-forgot:hover {
    text-decoration: underline;
}

.m4h-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.m4h-input:focus {
    outline: none;
    border-color: #d9261c;
    box-shadow: 0 0 0 3px rgba(217, 38, 28, 0.12);
}

.m4h-pass-wrapper {
    position: relative;
    width: 100%;
}

.m4h-pass-wrapper .m4h-input {
    padding-right: 42px;
}

.m4h-toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
}

.m4h-toggle-pass:hover {
    color: #475569;
}

.m4h-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}

.m4h-auth-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.m4h-auth-alert.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.m4h-auth-alert.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.m4h-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.m4h-btn-primary {
    background: #d9261c;
    color: #ffffff;
}

.m4h-btn-primary:hover {
    background: #b91c1c;
}

.m4h-btn-block {
    width: 100%;
}

.m4h-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.m4h-auth-divider {
    position: relative;
    text-align: center;
    margin: 20px 0 16px 0;
}

.m4h-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
}

.m4h-auth-divider span {
    position: relative;
    background: #ffffff;
    padding: 0 12px;
    font-size: 12px;
    color: #94a3b8;
    text-transform: lowercase;
}

.m4h-google-btn-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.m4h-forgot-header {
    text-align: center;
    margin-bottom: 16px;
}

.m4h-forgot-header h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #0f172a;
}

.m4h-forgot-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.m4h-form-footer {
    text-align: center;
    margin-top: 12px;
}

.m4h-back-to-login {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
}

.m4h-back-to-login:hover {
    color: #d9261c;
}
