/* Component Specific Styles over theme.css */

/* Auth Cards */
.auth-card {
    background: var(--bg-panel);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
}

.auth-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider:not(:empty)::before { margin-right: 1rem; }
.auth-divider:not(:empty)::after { margin-left: 1rem; }

.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.auth-submit-btn {
    padding: 0.75rem;
}

.auth-remember-checkbox {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.btn-google {
    background-color: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-weight: 500;
}
.btn-google:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-focus);
}
.btn-google img {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

/* Cards */
.card {
    background: var(--bg-panel);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-width: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Model Grid */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    min-width: 0;
}

.model-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-focus);
}

.model-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.model-name-with-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    min-width: 0;
    vertical-align: middle;
}

.model-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.verified-badge {
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 0.95rem;
    object-fit: contain;
    display: inline-block;
}

.verified-badge-xs {
    width: 0.8rem;
    height: 0.8rem;
    flex-basis: 0.8rem;
}

.verified-badge-sm {
    width: 0.9rem;
    height: 0.9rem;
    flex-basis: 0.9rem;
}

.verified-badge-lg {
    width: 1.05rem;
    height: 1.05rem;
    flex-basis: 1.05rem;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-input);
    color: var(--text-muted);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-primary { background: var(--primary-color); color: white; }
.badge-warning { background: var(--warning-color); color: #000; }
.badge-danger { background: var(--error-color); color: #fff; }

/* Pricing Plans */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    min-width: 0;
}

.plan-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: transform 0.3s, box-shadow 0.3s;
}

.plan-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.plan-card.featured {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-blue);
    transform: translateY(-4px);
    z-index: 1;
}

.plan-card.featured:hover {
    transform: translateY(-8px);
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 1.5rem 0;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
    flex: 1;
}

.plan-features li {
    padding: 0.5rem 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.plan-features li i {
    color: var(--success-color);
    margin-right: 0.75rem;
}

.plan-card form {
    width: 100%;
}

.plan-card .btn {
    width: 100%;
    justify-content: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Dropdowns */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background-color: var(--bg-panel);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    z-index: 1000;
    padding: 0.5rem 0;
}
.dropdown:hover .dropdown-menu { display: block; animation: fadeIn 0.2s; }
.dropdown-menu a {
    color: var(--text-main);
    padding: 0.75rem 1.25rem;
    display: block;
    font-size: 0.95rem;
}
.dropdown-menu a:hover {
    background-color: var(--bg-hover);
    color: var(--primary-color);
}
.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}
.nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 0.5rem;
    object-fit: cover;
}

/* RTL Support in style.css for generic alignments where possible */
[dir="rtl"] .dropdown-menu { right: auto; left: 0; }
[dir="rtl"] .btn i { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .btn i:only-child { margin-left: 0; }
[dir="rtl"] .nav-avatar { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .plan-features li i { margin-right: 0; margin-left: 0.75rem; }
[dir="rtl"] .text-right { text-align: left; }
[dir="rtl"] .text-left { text-align: right; }

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 620px;
    }

    .plan-card {
        padding: 1.5rem;
    }

    .plan-card.featured,
    .plan-card.featured:hover {
        transform: none;
    }
}

@media (max-width: 700px) {
    .model-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pricing-grid {
        gap: 1rem;
    }

    .card-body {
        padding: 1rem;
    }
}
