#firebase-auth {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.fb-auth h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.fb-auth .form-control {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.1rem;
    box-sizing: border-box;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.phone-input-wrapper .country-code {
    padding: 0.75rem 0.5rem 0.75rem 0.75rem;
    background: #f5f5f5;
    color: #333;
    font-weight: bold;
    font-size: 1.1rem;
    border-right: 1px solid #ddd;
}

.phone-input-wrapper input {
    border: none !important;
    margin: 0 !important;
    flex: 1;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.phone-input-wrapper input:focus {
    outline: none;
}

.hint {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
    text-align: center;
}

.hint.valid {
    color: #2e7d32;
    font-weight: bold;
}

.fb-auth .btn {
    width: 100%;
    padding: 0.75rem;
    background: #4285f4;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.fb-auth .btn:hover:not(:disabled) {
    background: #3367d6;
}

.fb-auth .btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.fb-auth .error {
    color: #c00;
    padding: 0.75rem;
    margin-top: 0.75rem;
    background: #fee;
    border-radius: 4px;
    text-align: center;
}

#loading {
    text-align: center;
    padding: 1rem;
    color: #666;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: #333;
}

#code-section input {
    text-align: center;
    letter-spacing: 0.5rem;
    font-size: 1.5rem;
}

/* RTL support */
[dir="rtl"] .fb-auth {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] #phone,
[dir="rtl"] #code {
    direction: ltr;
    text-align: left;
}

[dir="rtl"] .phone-input-wrapper {
    flex-direction: row-reverse;
}

[dir="rtl"] .phone-input-wrapper .country-code {
    border-left: 1px solid #ddd;
    border-right: none;
}