/*
 * EnFavori Design System — Foundation
 * -----------------------------------
 * Bu dosya EnFavori arayüzünün ortak tasarım sözleşmesidir.
 *
 * Geçiş prensibi:
 * - Yeni ortak UI kuralları burada tanımlanır.
 * - Sayfaya özel geçici yamalar yerine ef-* primitive/component sınıfları kullanılır.
 * - Eski sayfalar aşamalı olarak taşınır; bu dosya tek başına mevcut görünümü değiştirmez.
 */

:root {
    /* Brand */
    --ef-color-navy: #142844;
    --ef-color-navy-dark: #0d1b2d;
    --ef-color-blue: #1c9cf0;
    --ef-color-blue-dark: #1688d1;
    --ef-color-turquoise: #18c7bb;
    --ef-color-turquoise-dark: #10aa9f;

    /* Neutral */
    --ef-color-white: #ffffff;
    --ef-color-page: #f4f6f8;
    --ef-color-surface: #ffffff;
    --ef-color-surface-soft: #f8fafc;
    --ef-color-text: #172033;
    --ef-color-text-soft: #334155;
    --ef-color-muted: #64748b;
    --ef-color-light: #94a3b8;
    --ef-color-border: #e2e8f0;

    /* Semantic */
    --ef-color-success: #169b78;
    --ef-color-danger: #dc3545;
    --ef-color-warning: #d99a00;
    --ef-color-info-soft: #edf7ff;
    --ef-color-success-soft: #e9fbf8;
    --ef-color-danger-soft: #fff1f2;
    --ef-color-warning-soft: #fff8df;

    /* Typography */
    --ef-font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ef-font-size-xs: 12px;
    --ef-font-size-sm: 13px;
    --ef-font-size-md: 15px;
    --ef-font-size-lg: 18px;
    --ef-font-size-xl: 22px;
    --ef-font-size-2xl: 28px;
    --ef-font-size-3xl: 36px;
    --ef-line-height-tight: 1.2;
    --ef-line-height-normal: 1.5;
    --ef-line-height-relaxed: 1.65;

    /* Spacing — 4px base scale */
    --ef-space-0: 0;
    --ef-space-1: 4px;
    --ef-space-2: 8px;
    --ef-space-3: 12px;
    --ef-space-4: 16px;
    --ef-space-5: 24px;
    --ef-space-6: 32px;
    --ef-space-7: 40px;
    --ef-space-8: 48px;

    /* Shape */
    --ef-radius-sm: 8px;
    --ef-radius-md: 12px;
    --ef-radius-lg: 16px;
    --ef-radius-pill: 999px;

    /* Elevation */
    --ef-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --ef-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --ef-shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.12);

    /* Layout */
    --ef-container-max: 1320px;
    --ef-page-gutter: 24px;
    --ef-mobile-page-gutter: 12px;
    --ef-control-height: 44px;
    --ef-header-height: 72px;
    --ef-shell-main-gap: 10px;
    --ef-breadcrumb-font-size: 12px;
    --ef-breadcrumb-font-weight: 650;
    --ef-breadcrumb-line-height: 1.35;

    /* Action system */
    --ef-action-height: 34px;
    --ef-action-radius: 7px;
    --ef-action-gap: 5px;
    --ef-action-padding-x: 9px;
    --ef-action-font-size: 11px;
    --ef-action-font-weight: 800;
    --ef-action-icon-size: 11px;
    --ef-action-social-size: 34px;

    /* Motion */
    --ef-transition-fast: 150ms ease;
    --ef-transition-normal: 220ms ease;
}

/*
 * Scope primitive.
 * Yeni veya taşınmış bir ekranın ana wrapper'ında kullanılır.
 */
.ef-ui,
.ef-ui *,
.ef-ui *::before,
.ef-ui *::after {
    box-sizing: border-box;
}

.ef-ui {
    color: var(--ef-color-text);
    font-family: var(--ef-font-sans);
    font-size: var(--ef-font-size-md);
    line-height: var(--ef-line-height-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ef-container {
    width: min(100%, var(--ef-container-max));
    margin-inline: auto;
    padding-inline: var(--ef-page-gutter);
}

.ef-stack {
    display: flex;
    flex-direction: column;
    gap: var(--ef-stack-gap, var(--ef-space-4));
}

.ef-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ef-cluster-gap, var(--ef-space-3));
}

.ef-grid {
    display: grid;
    grid-template-columns: repeat(var(--ef-grid-columns, 12), minmax(0, 1fr));
    gap: var(--ef-grid-gap, var(--ef-space-5));
}

/* Page heading */
.ef-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ef-space-5);
    margin-bottom: var(--ef-space-5);
}

.ef-page-header__main {
    min-width: 0;
}

.ef-page-header__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--ef-space-2);
}

.ef-page-title {
    margin: 0;
    color: var(--ef-color-navy);
    font-family: var(--ef-font-sans);
    font-size: clamp(24px, 3vw, var(--ef-font-size-3xl));
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

.ef-page-description {
    max-width: 760px;
    margin: var(--ef-space-2) 0 0;
    color: var(--ef-color-muted);
    font-size: var(--ef-font-size-md);
    line-height: var(--ef-line-height-relaxed);
}

/* Card */
.ef-card {
    min-width: 0;
    background: var(--ef-color-surface);
    border: 1px solid var(--ef-color-border);
    border-radius: var(--ef-radius-md);
    box-shadow: var(--ef-shadow-sm);
}

.ef-card__header,
.ef-card__body,
.ef-card__footer {
    padding: var(--ef-space-4);
}

.ef-card__header {
    border-bottom: 1px solid var(--ef-color-border);
}

.ef-card__footer {
    border-top: 1px solid var(--ef-color-border);
}

.ef-card__title {
    margin: 0;
    color: var(--ef-color-text);
    font-size: var(--ef-font-size-lg);
    font-weight: 750;
    line-height: 1.3;
}

/* Buttons + public action system */
.ef-btn,
.ef-action-button {
    display: inline-flex;
    min-height: var(--ef-action-height);
    align-items: center;
    justify-content: center;
    gap: var(--ef-action-gap);
    padding: 0 var(--ef-action-padding-x);
    appearance: none;
    color: var(--ef-color-navy);
    background: var(--ef-color-white);
    border: 1px solid var(--ef-color-border);
    border-radius: var(--ef-action-radius);
    cursor: pointer;
    font-family: var(--ef-font-sans);
    font-size: var(--ef-action-font-size);
    font-weight: var(--ef-action-font-weight);
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color var(--ef-transition-fast),
        border-color var(--ef-transition-fast),
        color var(--ef-transition-fast),
        box-shadow var(--ef-transition-fast),
        transform var(--ef-transition-fast);
}

.ef-btn > i,
.ef-btn > svg,
.ef-action-button > i,
.ef-action-button > svg {
    flex: 0 0 auto;
    font-size: var(--ef-action-icon-size);
}

.ef-btn:hover,
.ef-action-button:hover {
    text-decoration: none;
}

.ef-btn:active,
.ef-action-button:active {
    transform: translateY(1px);
}

.ef-btn:disabled,
.ef-btn[aria-disabled="true"],
.ef-action-button:disabled,
.ef-action-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: none;
}

.ef-btn--primary,
.ef-action-button-primary,
.ef-action-button-share {
    color: var(--ef-color-white);
    background: var(--ef-color-navy);
    border-color: var(--ef-color-navy);
}

.ef-btn--primary:hover,
.ef-action-button-primary:hover,
.ef-action-button-share:hover {
    color: var(--ef-color-white);
    background: var(--ef-color-navy-dark);
    border-color: var(--ef-color-navy-dark);
}

.ef-btn--accent {
    color: var(--ef-color-white);
    background: var(--ef-color-turquoise-dark);
    border-color: var(--ef-color-turquoise-dark);
}

.ef-btn--accent:hover {
    color: var(--ef-color-white);
    background: var(--ef-color-turquoise);
    border-color: var(--ef-color-turquoise);
}

.ef-btn--secondary {
    color: var(--ef-color-navy);
    background: var(--ef-color-white);
    border-color: var(--ef-color-border);
}

.ef-btn--secondary:hover {
    color: var(--ef-color-navy-dark);
    background: var(--ef-color-surface-soft);
    border-color: #cbd5e1;
}

.ef-btn--ghost {
    color: var(--ef-color-navy);
    background: transparent;
    border-color: transparent;
}

.ef-btn--ghost:hover {
    color: var(--ef-color-navy-dark);
    background: var(--ef-color-surface-soft);
}

.ef-btn--danger {
    color: var(--ef-color-white);
    background: var(--ef-color-danger);
    border-color: var(--ef-color-danger);
}

.ef-btn--sm {
    min-height: 36px;
    padding-inline: 12px;
    font-size: var(--ef-font-size-xs);
}

.ef-btn--lg {
    min-height: 50px;
    padding-inline: 20px;
    font-size: var(--ef-font-size-md);
}

.ef-btn--block {
    width: 100%;
}

/* Canonical share action */
.ef-share {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--ef-action-gap);
    margin: 0;
}

.ef-share > summary {
    list-style: none;
}

.ef-share > summary::-webkit-details-marker {
    display: none;
}

.ef-share-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 7px);
    z-index: 400;
    display: none;
    align-items: center;
    gap: var(--ef-action-gap);
    width: max-content;
    max-width: calc(100vw - 24px);
    margin: 0;
    padding: 5px;
    background: rgba(8, 25, 44, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--ef-action-radius);
    box-shadow: 0 8px 22px rgba(3, 14, 28, 0.28);
}

.ef-share[open] .ef-share-popover,
.ef-share.is-open .ef-share-popover {
    display: flex;
}

.ef-share-option {
    display: inline-flex;
    flex: 0 0 var(--ef-action-social-size);
    width: var(--ef-action-social-size);
    height: var(--ef-action-social-size);
    align-items: center;
    justify-content: center;
    padding: 0;
    appearance: none;
    color: #fff !important;
    border: 0;
    border-radius: var(--ef-action-radius);
    font-size: var(--ef-action-icon-size);
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: none;
}

.ef-share-option:hover,
.ef-share-option:focus {
    color: #fff !important;
    filter: brightness(1.06);
    outline: none;
}

.ef-share-option.is-facebook { background: #1877f2; }
.ef-share-option.is-x { background: #050505; }
.ef-share-option.is-whatsapp { background: #1fbf64; }
.ef-share-option.is-telegram { background: #229ed9; }
.ef-share-option.is-linkedin { background: #0a66c2; }
.ef-share-option.is-copy { background: #17aab0; }
.ef-share-copy.is-copied { background: #0ea592 !important; }

/* Forms */
.ef-form-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: var(--ef-space-2);
}

.ef-label {
    margin: 0;
    color: var(--ef-color-text-soft);
    font-size: var(--ef-font-size-sm);
    font-weight: 700;
    line-height: 1.35;
}

.ef-help {
    margin: 0;
    color: var(--ef-color-muted);
    font-size: var(--ef-font-size-xs);
    line-height: 1.5;
}

.ef-error {
    margin: 0;
    color: var(--ef-color-danger);
    font-size: var(--ef-font-size-xs);
    font-weight: 650;
    line-height: 1.45;
}

.ef-input,
.ef-select,
.ef-textarea {
    width: 100%;
    min-width: 0;
    color: var(--ef-color-text);
    background: var(--ef-color-white);
    border: 1px solid #cbd5e1;
    border-radius: var(--ef-radius-sm);
    font-family: var(--ef-font-sans);
    font-size: 14px;
    line-height: 1.4;
    transition:
        border-color var(--ef-transition-fast),
        box-shadow var(--ef-transition-fast),
        background-color var(--ef-transition-fast);
}

.ef-input,
.ef-select {
    min-height: var(--ef-control-height);
    padding: 0 12px;
}

.ef-textarea {
    min-height: 120px;
    padding: 11px 12px;
    resize: vertical;
}

.ef-input::placeholder,
.ef-textarea::placeholder {
    color: var(--ef-color-light);
}

.ef-input[aria-invalid="true"],
.ef-select[aria-invalid="true"],
.ef-textarea[aria-invalid="true"] {
    border-color: var(--ef-color-danger);
}

/* Badge */
.ef-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 8px;
    color: var(--ef-color-text-soft);
    background: var(--ef-color-surface-soft);
    border: 1px solid var(--ef-color-border);
    border-radius: var(--ef-radius-pill);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.ef-badge--info {
    color: #075985;
    background: var(--ef-color-info-soft);
    border-color: #cfe9fb;
}

.ef-badge--success {
    color: #08715a;
    background: var(--ef-color-success-soft);
    border-color: #bcebe2;
}

.ef-badge--warning {
    color: #7a4d00;
    background: var(--ef-color-warning-soft);
    border-color: #efd27a;
}

.ef-badge--danger {
    color: #9f1239;
    background: var(--ef-color-danger-soft);
    border-color: #fecdd3;
}

/* Empty state */
.ef-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ef-space-3);
    min-height: 220px;
    padding: var(--ef-space-6);
    color: var(--ef-color-muted);
    background: var(--ef-color-surface);
    border: 1px dashed #cbd5e1;
    border-radius: var(--ef-radius-md);
    text-align: center;
}

.ef-empty-state__title {
    margin: 0;
    color: var(--ef-color-text);
    font-size: var(--ef-font-size-lg);
    font-weight: 750;
}

.ef-empty-state__text {
    max-width: 560px;
    margin: 0;
    line-height: var(--ef-line-height-relaxed);
}

/* Simple table shell */
.ef-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--ef-color-white);
    border: 1px solid var(--ef-color-border);
    border-radius: var(--ef-radius-md);
}

.ef-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ef-color-text-soft);
    font-family: var(--ef-font-sans);
    font-size: var(--ef-font-size-sm);
}

.ef-table th,
.ef-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ef-color-border);
    text-align: left;
    vertical-align: middle;
}

.ef-table th {
    color: var(--ef-color-navy);
    background: var(--ef-color-surface-soft);
    font-size: var(--ef-font-size-xs);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.ef-table tr:last-child td {
    border-bottom: 0;
}

/* Accessibility */
.ef-btn:focus-visible,
.ef-action-button:focus-visible,
.ef-input:focus-visible,
.ef-select:focus-visible,
.ef-textarea:focus-visible,
.ef-ui a:focus-visible {
    outline: 3px solid rgba(28, 156, 240, 0.25);
    outline-offset: 2px;
}

.ef-input:focus,
.ef-select:focus,
.ef-textarea:focus {
    border-color: var(--ef-color-blue);
    box-shadow: 0 0 0 3px rgba(28, 156, 240, 0.12);
    outline: 0;
}

.ef-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 767.98px) {
    :root {
        --ef-page-gutter: 16px;
        --ef-control-height: 44px;
        --ef-action-height: 38px;
        --ef-action-radius: 8px;
        --ef-action-font-size: 11px;
        --ef-action-icon-size: 12px;
        --ef-action-social-size: 38px;
    }

    .ef-page-header {
        flex-direction: column;
        gap: var(--ef-space-3);
        margin-bottom: var(--ef-space-4);
    }

    .ef-page-header__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .ef-page-title {
        font-size: 24px;
        line-height: 1.18;
    }

    .ef-card__header,
    .ef-card__body,
    .ef-card__footer {
        padding: var(--ef-space-3);
    }

    .ef-grid {
        grid-template-columns: 1fr;
        gap: var(--ef-space-4);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ef-ui *,
    .ef-ui *::before,
    .ef-ui *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ENFAVORI GLOBAL PUBLIC SHELL V1 START */
/*
 * Public sayfalarin dis kabugu tek kaynaktan yonetilir.
 * Header, breadcrumb ve ana icerik ayni 1320px eksenini kullanir.
 */
.ef-shell-container {
    width: calc(100% - (var(--ef-page-gutter) * 2));
    max-width: var(--ef-container-max);
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
}

.ef-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 16px;
    margin: 0 0 10px;
    padding: 0;
    color: var(--ef-color-muted);
    font-family: var(--ef-font-sans);
    font-size: var(--ef-breadcrumb-font-size);
    font-weight: var(--ef-breadcrumb-font-weight);
    line-height: var(--ef-breadcrumb-line-height);
    letter-spacing: 0;
}

.ef-breadcrumb a,
.ef-breadcrumb [aria-current="page"] {
    color: var(--ef-color-muted);
    font: inherit;
    text-decoration: none;
}

.ef-breadcrumb a:hover,
.ef-breadcrumb a:focus {
    color: var(--ef-color-turquoise-dark);
    text-decoration: none;
    outline: none;
}

.ef-breadcrumb .sep,
.ef-breadcrumb [aria-hidden="true"] {
    color: var(--ef-color-light);
}

@media (max-width: 767.98px) {
    .ef-shell-container {
        width: 100%;
        max-width: none;
        padding-right: var(--ef-mobile-page-gutter);
        padding-left: var(--ef-mobile-page-gutter);
    }

    .ef-breadcrumb {
        gap: 6px;
        margin-bottom: 8px;
        font-size: 11px;
    }
}
/* ENFAVORI GLOBAL PUBLIC SHELL V1 END */