/* 
 * WP Work Manager - Isolated Auth Popup Styles
 * All classes are prefixed with wm- to prevent conflicts.
 */

#wm-auth-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Be Vietnam Pro', sans-serif;
}

#wm-auth-popup.is-active {
    opacity: 1;
    visibility: visible;
}

.wm-auth-popup-container {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 28px;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

#wm-auth-popup.is-active .wm-auth-popup-container {
    transform: scale(1) translateY(0);
}

.wm-auth-popup-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s;
    color: #64748b;
}

.wm-auth-popup-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* UI Elements - Prefixed to avoid conflicts */
.wm-auth-component .wm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

.wm-auth-component .wm-card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

/* Tabs */
.wm-auth-component .wm-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 16px;
    margin-bottom: 8px;
}

.wm-auth-component .wm-tab {
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
}

.wm-auth-component .wm-tab-active {
    background: #ffffff;
    color: #943111;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Forms */
.wm-auth-component .wm-form-control {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 12px;
}

.wm-auth-component .wm-label {
    padding: 4px 0;
}

.wm-auth-component .wm-label-text {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.wm-auth-component .wm-input {
    width: 100%;
    height: 48px;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #1e293b;
    outline: none;
}

.wm-auth-component .wm-input:focus {
    border-color: #943111;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(148, 49, 17, 0.1);
}

.wm-auth-component .wm-input-with-icon {
    padding-left: 48px;
}

.wm-auth-component .wm-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.wm-auth-component .wm-input-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
}

/* Buttons */
.wm-auth-component .wm-btn-primary {
    width: 100%;
    height: 52px;
    background: #943111;
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 15px -3px rgba(148, 49, 17, 0.3);
}

.wm-auth-component .wm-btn-primary:hover {
    background: #7a280e;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(148, 49, 17, 0.4);
}

.wm-auth-component .wm-btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Toast */
#wm-auth-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000000;
    pointer-events: none;
    display: none;
}

.wm-alert-box {
    background: #1e293b;
    color: #fff;
    padding: 16px 28px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    border-bottom: 4px solid #334155;
}

.wm-toast-icon-success {
    color: #22c55e;
}

.wm-toast-icon-error {
    color: #ef4444;
}

/* Grid */
.wm-grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Helpers */
.wm-hidden {
    display: none !important;
}

.wm-text-center {
    text-align: center;
}

.wm-mb-6 {
    margin-bottom: 1.5rem;
}

.wm-mt-6 {
    margin-top: 1.5rem;
}

.wm-loading {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: wm-spin 0.8s linear infinite;
}

@keyframes wm-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes wm-pulse {

    0%,
    100% {
        opacity: 0.05;
        transform: scale(1);
    }

    50% {
        opacity: 0.1;
        transform: scale(1.1);
    }
}

.wm-bg-pulse {
    position: absolute;
    background: #943111;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    animation: wm-pulse 8s infinite ease-in-out;
}