/* ============================================
   TOPRAK MEDYA - Phone Mask Country Picker
   ============================================ */

/* Trigger (input içinde sol — sadece +dial) */
.input-wrap.has-country { position: relative; }
.input-wrap.has-country input[data-mask="phone"] {
    padding-left: 72px !important;
}

.cc-trigger {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    height: calc(100% - 12px);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 8px;
    border: 0;
    border-right: 1px solid #E2E8F0;
    background: transparent;
    color: #0F172A;
    font: 600 13.5px/1 inherit;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease;
    z-index: 3;
    white-space: nowrap;
}
.cc-trigger:hover { background: #F1F5F9; }
.cc-trigger:focus-visible { outline: 2px solid #2563EB; outline-offset: 1px; }
.cc-trigger .cc-dial { font-variant-numeric: tabular-nums; }
.cc-trigger .cc-caret { color: #94A3B8; margin-left: 2px; }

/* ============================================
   Popover (body'e attached - fixed, sayfa yüksekliğini etkilemez)
   ============================================ */
.cc-popover {
    position: fixed;
    z-index: 9999;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 32px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
    overflow: hidden;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.cc-popover.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
}

/* Search header */
.cc-pop-head {
    padding: 12px;
    border-bottom: 1px solid #F1F5F9;
    background: #FAFBFC;
}
.cc-search {
    position: relative;
}
.cc-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    pointer-events: none;
}
.cc-search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px;
    border: 1px solid #E2E8F0;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13.5px;
    color: #0F172A;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cc-search input::placeholder { color: #94A3B8; }
.cc-search input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* List */
.cc-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.cc-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: #0F172A;
    transition: background 0.12s ease;
    user-select: none;
}
.cc-list li:hover {
    background: #F1F5F9;
}
.cc-list li.is-active {
    background: #F1F5F9;
}
.cc-list li.is-selected {
    background: #DBEAFE;
    color: #1D4ED8;
    font-weight: 500;
}
.cc-list li.is-selected.is-active {
    background: #BFDBFE;
}
.cc-list li.is-selected .cc-dial { color: #1D4ED8; }
.cc-list .cc-flag {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    font-family: 'Twemoji Country Flags','Segoe UI Emoji','Apple Color Emoji',sans-serif;
}
.cc-list .cc-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cc-list .cc-dial {
    color: #94A3B8;
    font-size: 12.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.cc-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 13px;
    color: #94A3B8;
}

/* Custom scrollbar */
.cc-list::-webkit-scrollbar { width: 6px; }
.cc-list::-webkit-scrollbar-track { background: transparent; }
.cc-list::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}
.cc-list::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* Mobile */
@media (max-width: 480px) {
    .cc-popover { width: calc(100vw - 24px); }
    .cc-list { max-height: 50vh; }
}
