/**
 * Pozitif Ekip Hub - Bileşenler (Components)
 * Strapi & Shadcn UI Uyumlu Butonlar, Kartlar, Rozetler ve Modallar
 */

/* Kartlar */
.card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* Butonlar (32px Standart, 26px Small) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(253, 54, 110, 0.2);
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary, .btn-outline {
    background: #ffffff;
    border-color: var(--border);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover, .btn-outline:hover {
    background: var(--bg-subtle);
    border-color: #cbd5e1;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
    font-weight: 600;
}
.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 500;
}

/* Form Elemanları */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 12px;
}
.form-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.form-control {
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 0.65rem;
    font-family: inherit;
    font-size: 12px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: all 0.15s ease;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Durum Rozetleri (Strapi Status Pill Standardı) */
.status-badge, .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success-border);
}
.status-active .status-dot {
    background-color: var(--success);
    box-shadow: 0 0 4px var(--success);
}

.status-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}
.status-warning .status-dot {
    background-color: var(--warning);
    box-shadow: 0 0 4px var(--warning);
}

.status-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}
.status-danger .status-dot {
    background-color: var(--danger);
    box-shadow: 0 0 4px var(--danger);
}

.badge-platform {
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
}

/* Modal Pencereleri (Strapi Temiz Beyaz Modal) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open {
    display: flex;
}

.modal-window {
    position: relative;
    z-index: 1001;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: none;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalIn 0.18s ease-out;
}
.modal-window.open {
    display: flex;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.modal-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow-y: auto;
}
.drawer-section, .conditional-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.drawer-section h4 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.modal-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background: #f8fafc;
}

/* Bildirim Tostları (Karanlık Şık Alt Bar) */
.toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    background: #0f172a;
    color: #ffffff;
    padding: 0.65rem 1rem;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-item.show {
    transform: translateY(0);
    opacity: 1;
}
.toast-item.hide {
    transform: translateY(20px);
    opacity: 0;
}
.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    margin-left: 8px;
}

.toast-success .toast-icon { color: #34d399; }
.toast-error .toast-icon { color: #f87171; }
.toast-warning .toast-icon { color: #fbbf24; }
.toast-info .toast-icon { color: #60a5fa; }

/* Küçük Spinner */
.spinner-sm {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
