/* ============================================
   SKM - Survey Kepuasan Masyarakat v2.4
   ============================================ */

/* ============ ADMIN WRAP ============ */
.skm-wrap h1 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
}

.skm-wrap h1 .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #3b82f6;
}

.skm-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 16px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.skm-card h2 {
    margin-top: 0;
    font-size: 16px;
    color: #1e293b;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.skm-form-row { margin-bottom: 14px; }

.skm-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
    font-size: 13px;
}

.skm-form-row input[type="text"],
.skm-form-row select,
.skm-form-row textarea {
    width: 100%;
    max-width: 700px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.skm-form-row input[type="text"]:focus,
.skm-form-row select:focus,
.skm-form-row textarea:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.skm-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 6px;
    max-width: 900px;
}

.skm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    margin: 0;
}

.skm-checkbox-item:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
}

.skm-checkbox-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
}

.skm-checkbox-item:has(input:checked) {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.skm-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 2px 2px 2px 0;
}

/* ============ FRONTEND ============ */
.skm-frontend {
    max-width: 1100px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.skm-frontend *,
.skm-frontend *::before,
.skm-frontend *::after {
    box-sizing: border-box;
}

.skm-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.skm-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    margin: 0 0 16px;
    color: #0f172a;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

.skm-section h2 .dashicons {
    color: #3b82f6;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* ============ REGULASI ============ */
.skm-regulasi-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.skm-regulasi-list li { margin: 0; }

.skm-regulasi-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.2s;
    width: 100%;
}

.skm-regulasi-link:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    text-decoration: none;
    transform: translateX(4px);
}

.skm-regulasi-link .dashicons-pdf {
    color: #dc2626;
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.skm-view-label {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
    font-weight: normal;
}

/* ============ TAB NAVIGATION ============ */
.skm-tab-wrapper {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.skm-tab-nav {
    position: relative;
    display: flex;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 8px;
    gap: 4px;
    border-bottom: 1px solid #e2e8f0;
}

.skm-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.skm-tab-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    transition: transform 0.35s ease;
}

.skm-tab-btn:hover {
    color: #3b82f6;
}

.skm-tab-btn:hover .dashicons {
    transform: scale(1.1);
}

.skm-tab-btn.active {
    color: #1d4ed8;
}

.skm-tab-btn.active .dashicons {
    transform: scale(1.15);
}

.skm-tab-indicator {
    position: absolute;
    top: 8px;
    bottom: 8px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15), 0 1px 3px rgba(15, 23, 42, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
    width: 0;
    left: 8px;
}

/* ============ TAB PANES ============ */
.skm-tab-pane {
    display: none;
    padding: 28px 32px;
}

.skm-tab-pane.active {
    display: block;
    animation: skmPaneIn 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes skmPaneIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skm-fade-in { will-change: opacity, transform; }

/* ============ FORM SURVEY ============ */
.skm-desc {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 8px;
    color: #1e40af;
    font-size: 13.5px;
    margin: 0 0 22px;
    line-height: 1.5;
}

.skm-desc .dashicons {
    flex-shrink: 0;
    margin-top: 1px;
}

.skm-question {
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

.skm-question:last-of-type { border-bottom: none; }

.skm-q-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.skm-q-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.skm-q-text {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 3px 0 0;
    line-height: 1.55;
}

.skm-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.skm-option {
    cursor: pointer;
    display: block;
    margin: 0;
}

.skm-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.skm-radio-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 14px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13.5px;
    font-weight: 500;
    color: #475569;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.skm-radio-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    opacity: 0;
    transition: opacity 0.25s;
}

.skm-radio-box .skm-lbl {
    position: relative;
    z-index: 1;
}

.skm-option:hover .skm-radio-box {
    border-color: #93c5fd;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.skm-option input[type="radio"]:checked + .skm-radio-box {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.skm-option input[type="radio"]:checked + .skm-radio-box::before {
    opacity: 1;
}

/* ============ SUBMIT BUTTON ============ */
.skm-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    letter-spacing: 0.2px;
}

.skm-submit-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.skm-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.45);
}

.skm-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.skm-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* ============ MESSAGES ============ */
.skm-form-message {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 500;
    display: none;
    animation: skmPaneIn 0.3s ease;
}

.skm-form-message.skm-success,
.skm-form-message.skm-error { display: block; }

.skm-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.skm-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* ============ HASIL / CHART GRID (2 KOLOM) ============ */
.skm-charts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skm-charts-grid {
    display: grid;
    gap: 16px;
    margin-top: 4px;
}

.skm-charts-grid.skm-charts-2col {
    grid-template-columns: repeat(2, 1fr);
}

.skm-chart-card {
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.skm-chart-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.skm-chart-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}

.skm-chart-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-radius: 7px;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.skm-chart-card h4 {
    font-size: 13.5px;
    color: #0f172a;
    margin: 2px 0 0;
    line-height: 1.45;
    font-weight: 600;
}

.skm-chart-total {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #64748b;
    margin: 0 0 4px 34px;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 999px;
    width: fit-content;
}

.skm-chart-total .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

.skm-chart-container {
    position: relative;
    height: 220px;
    margin: 10px 0 0;
}

.skm-chart-container.skm-chart-pie { height: 220px; }

/* ============ EMPTY STATE ============ */
.skm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #94a3b8;
    text-align: center;
}

.skm-empty .dashicons {
    font-size: 56px;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.skm-empty p {
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

/* ============ CHART GRID (ADMIN HASIL) ============ */
.skm-charts-grid:not(.skm-charts-2col) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.skm-charts-grid:not(.skm-charts-2col) .skm-chart-card {
    text-align: left;
    padding: 20px 24px;
}

.skm-charts-grid:not(.skm-charts-2col) .skm-chart-container {
    height: 260px;
}

.skm-chart-card h3 {
    font-size: 14px;
    color: #334155;
    margin: 0 0 4px;
    line-height: 1.4;
}

/* ============================================
   SKM - MEDIA ADDON (Foto & Video) v2.4
   ============================================ */

/* ============ ADMIN MEDIA GRID ============ */
.skm-media-grid-admin {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

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

.skm-media-admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skm-media-admin-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.skm-media-admin-item:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
}

.skm-media-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skm-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.skm-media-thumb-video {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.skm-media-thumb-video .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.skm-media-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.skm-media-info strong {
    font-size: 13.5px;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skm-media-info small {
    font-size: 11.5px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ FRONTEND: MEDIA GALLERY ============ */
.skm-media-section {
    overflow: hidden;
}

.skm-media-block {
    margin-top: 18px;
}

.skm-media-block:first-of-type { margin-top: 4px; }

.skm-media-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skm-media-subtitle .dashicons {
    color: #3b82f6;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.skm-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.skm-media-grid-video {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.skm-media-item {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.skm-media-item:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.15);
    transform: translateY(-3px);
}

.skm-media-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform 0.4s ease;
}

.skm-media-item:hover img {
    transform: scale(1.04);
}

.skm-media-item video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    max-height: 280px;
}

.skm-media-item figcaption {
    padding: 10px 14px;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    line-height: 1.4;
}

/* ============ LIGHTBOX FOTO ============ */
.skm-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 30px;
    cursor: zoom-out;
    backdrop-filter: blur(6px);
}

.skm-lightbox.open { opacity: 1; }

.skm-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.skm-lightbox.open img { transform: scale(1); }

.skm-lightbox-close {
    position: absolute;
    top: 20px;
    right: 26px;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    font-weight: 300;
    transition: transform 0.2s;
    user-select: none;
}

.skm-lightbox-close:hover { transform: scale(1.15); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .skm-charts-grid.skm-charts-2col {
        grid-template-columns: 1fr;
    }
    .skm-chart-container,
    .skm-chart-container.skm-chart-pie {
        height: 240px;
    }
}

@media (max-width: 720px) {
    .skm-tab-btn {
        flex-direction: column;
        gap: 4px;
        padding: 10px 8px;
        font-size: 13px;
    }
    .skm-tab-btn .dashicons {
        font-size: 22px;
        width: 22px;
        height: 22px;
    }
    .skm-tab-pane {
        padding: 20px 18px;
    }
}

@media (max-width: 600px) {
    .skm-section { padding: 18px 16px; }
    .skm-section h2 { font-size: 17px; }
    .skm-options { grid-template-columns: 1fr; }
    .skm-submit-btn { width: 100%; }
    .skm-checkbox-group { grid-template-columns: 1fr; }
    .skm-chart-card { padding: 14px 16px; }
    .skm-chart-card h4 { font-size: 13px; }
    .skm-chart-container,
    .skm-chart-container.skm-chart-pie {
        height: 220px;
    }
    .skm-chart-total { margin-left: 0; }

    /* Media responsive */
    .skm-media-grid,
    .skm-media-grid-video {
        grid-template-columns: 1fr;
    }
    .skm-media-item img {
        height: 200px;
    }
    .skm-media-admin-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .skm-media-thumb {
        width: 100%;
        height: 120px;
    }
    .skm-lightbox-close {
        top: 12px;
        right: 16px;
        font-size: 34px;
    }
}