/* 
 * Simple, Responsive Styles for local_qlogin
 * SCOPED ONLY to pages with #qlogin-wrapper
 */

/* Main Wrapper - Centers the form */
#qlogin-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 70vh;
    padding: 20px;
    box-sizing: border-box;
}

/* The login card container */
#qlogin-wrapper .qlogin-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Logo Section */
#qlogin-wrapper .qlogin-logo {
    text-align: center;
    margin-bottom: 20px;
}

#qlogin-wrapper .qlogin-logo img {
    max-height: 60px;
    width: auto;
}

#qlogin-wrapper .qlogin-logo .site-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-top: 8px;
}

/* Tabs */
#qlogin-wrapper .auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

#qlogin-wrapper .tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

#qlogin-wrapper .tab-btn:hover {
    color: #333;
}

#qlogin-wrapper .tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

/* Form Title */
#qlogin-wrapper .form-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
    text-align: center;
}

#qlogin-wrapper .form-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 20px 0;
    text-align: center;
}

/* Alerts */
#qlogin-wrapper .alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

#qlogin-wrapper .alert-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

#qlogin-wrapper .alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Form Groups */
#qlogin-wrapper .form-group {
    margin-bottom: 15px;
}

#qlogin-wrapper .form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
}

#qlogin-wrapper .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#qlogin-wrapper .form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

/* Login Method Switch */
#qlogin-wrapper .method-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#qlogin-wrapper .method-option {
    flex: 1;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666;
    transition: all 0.2s;
}

#qlogin-wrapper .method-option:hover {
    background: #f5f5f5;
}

#qlogin-wrapper .method-option input {
    display: none;
}

#qlogin-wrapper .method-option.selected {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Primary Button */
#qlogin-wrapper .btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: #0073aa;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

#qlogin-wrapper .btn-primary:hover {
    background: #005a87;
}

/* Google Button */
#qlogin-wrapper .btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

#qlogin-wrapper .btn-google:hover {
    background: #f5f5f5;
}

/* Divider */
#qlogin-wrapper .divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #999;
    font-size: 0.8rem;
}

#qlogin-wrapper .divider::before,
#qlogin-wrapper .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

#qlogin-wrapper .divider span {
    padding: 0 10px;
}

/* Honeypot Hidden */
#qlogin-wrapper .hp-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* Hidden Utility */
#qlogin-wrapper .hidden {
    display: none !important;
}

/* Phone Input (intl-tel-input) overrides */
#qlogin-wrapper .iti {
    width: 100%;
    display: block;
}

#qlogin-wrapper .iti__country-list {
    max-height: 200px;
}

/* Responsive: Mobile */
@media (max-width: 480px) {
    #qlogin-wrapper {
        padding: 15px;
    }

    #qlogin-wrapper .qlogin-card {
        padding: 20px;
    }

    #qlogin-wrapper .tab-btn {
        font-size: 0.8rem;
        padding: 8px 5px;
    }

    #qlogin-wrapper .form-title {
        font-size: 1.2rem;
    }
}