/*
 * SERP Empire custom UI styles (cacheable, loaded globally).
 *
 * Consolidated here from per-page <style> blocks so the browser can cache them
 * instead of re-downloading the rules with every page render. All selectors are
 * scoped (page-specific class/id prefixes), so loading this everywhere is safe.
 *
 * Cache-busting: bump the filename version (serp-ui-YYYYMMDD.css) and update the
 * <link> in resources/views/layouts/app.blade.php whenever this file changes.
 */

/* ── Alpine: hide elements until Alpine has initialised ── */
[x-cloak] { display: none !important; }

/* ── Google Places autocomplete inside a Bootstrap modal ──
   The suggestions dropdown must sit above the modal (z-index ~1050), otherwise it
   renders behind it and the location field looks broken. */
.pac-container { z-index: 10000 !important; }

/* ── Create-a-campaign: search-engine type cards ── */
.search-engine { margin-bottom: 8px; }

.search-engine .col-md-6 { margin-bottom: 18px; }

.search-engine .kt-option {
    height: 100%;
    margin: 0;
    padding: 18px 20px;
    border: 1.5px solid #ebedf2;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    align-items: center;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.search-engine .kt-option:hover {
    border-color: #b9c2ff;
    box-shadow: 0 4px 16px rgba(93, 120, 255, .10);
}

/* Selected card (the label that contains the checked radio). */
.search-engine label.kt-option:has(input:checked) {
    border-color: #5d78ff;
    background: #f4f6ff;
    box-shadow: 0 0 0 3px rgba(93, 120, 255, .12);
}

.search-engine .kt-option__label { padding-left: 14px; }

.search-engine .kt-option__head { align-items: center; }

.search-engine .kt-option__title {
    font-size: 15px;
    font-weight: 600;
    color: #48465b;
}

.search-engine .kt-option__body {
    font-size: 13px;
    color: #a2a5b9;
    margin-top: 2px;
}

/* Engine logo sits flush-right in the card head. */
.search-engine .kt-option__focus { margin-left: auto; }

/* ── Campaign settings: read-only campaign type display ── */
.campaign-type-display {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid #ebedf2;
    border-radius: 8px;
    background: #f7f8fa;
    max-width: 480px;
}

.campaign-type-icon img {
    height: 34px;
    width: 34px;
    border-radius: 8px;
    display: block;
}

.campaign-type-icon .badge {
    font-size: 18px;
    padding: 8px;
}

.campaign-type-info {
    display: flex;
    flex-direction: column;
}

.campaign-type-title {
    font-size: 15px;
    font-weight: 600;
    color: #48465b;
}

.campaign-type-desc {
    font-size: 13px;
    color: #a2a5b9;
}

/* ── Add-a-country modal ── */
#addCountryModal .modal-body { padding: 24px 28px; }

#addCountryModal .add-country-intro {
    font-size: 13px;
    color: #a2a5b9;
    margin-bottom: 20px;
}

#addCountryModal label {
    font-weight: 600;
    color: #48465b;
}

#addCountryModal .add-country-target {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

#addCountryModal .add-country-target .badge {
    font-size: 12px;
    padding: 6px 12px;
    border: 1px solid #ebedf2;
}

/* select2 should match the Metronic input height inside the modal */
#addCountryModal .select2-container .select2-selection--single {
    height: calc(1.5em + 1.3rem + 2px);
    display: flex;
    align-items: center;
}

/* ── Moved from layouts/app.blade.php <head> (already global) ── */
.kt-notification .notification-item:after { content: none; }

.flex-row.row {
    display: flex;
    flex-wrap: wrap;
}

.flex-row.row > [class*='col-'] {
    display: flex;
    flex-direction: column;
}

.flex-row.row:after,
.flex-row.row:before {
    display: flex;
}

option:not(:checked) { background-color: #fff; }

/* ── Portlet header with action toolbar (campaign / country header partials) ──
   Scoped so other portlets/tabs (e.g. the profile page tabs) are unaffected. */
.kt-portlet__head { position: relative; }

/* nowrap the head label only when the header carries the action toolbar */
.kt-portlet__head:has(.kt-portlet__head-toolbar-btn) .kt-portlet__head-label,
.campaign-header.kt-portlet__head-label {
    white-space: nowrap;
    overflow: hidden;
}

.kt-portlet__head-toolbar-btn {
    display: flex;
    position: absolute;
    top: 0;
    right: 25px;
    bottom: 0;
    align-items: center;
    align-content: flex-end;
}

.kt-portlet__head-toolbar-btn::before {
    display: block;
    content: '';
    width: 3em;
    height: 100%;
    background-image: linear-gradient(to left, white 0%, transparent 100%);
}

/* header tabs only (kt-portlet--tabs nested *inside* the head), not body tabs */
.kt-portlet__head .kt-portlet--tabs .nav-item {
    height: 60px;
    max-width: 300px;
}
