/**
 * ACF Plugin - Frontend Display Styles
 */

/* Container */
.acf-custom-fields-container {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #dee2e6;
    font-family: system-ui, -apple-system, sans-serif;
}

.acf-group { margin-bottom: 35px; }

.acf-group-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #343a40;
}

.acf-field-items { display: flex; flex-direction: column; }

/* Row Layout */
.acf-field-row {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    box-sizing: border-box;
}
.acf-field-row:last-child { border-bottom: none; }

.acf-field-label {
    flex: 0 0 240px;
    font-weight: 600;
    color: #495057;
    padding-right: 15px;
    box-sizing: border-box;
}

.acf-help-text {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: #6c757d;
    margin-top: 3px;
}

.acf-field-value {
    flex: 1;
    color: #212529;
    line-height: 1.6;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .acf-field-row { flex-direction: column; gap: 8px; }
    .acf-field-label { flex: 0 0 auto; padding-right: 0; }
}

/* Repeater */
.acf-repeater-container { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.acf-repeater-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
}
.acf-repeater-grid { display: flex; flex-wrap: wrap; gap: 15px; }
.acf-repeater-col { flex: 1 1 calc(33.333% - 15px); min-width: 180px; box-sizing: border-box; }
@media (max-width: 576px) { .acf-repeater-col { flex: 1 1 100%; } }
.acf-repeater-field { display: flex; flex-direction: column; gap: 4px; }
.acf-repeater-label { font-size: 0.85rem; font-weight: 600; color: #6c757d; }
.acf-repeater-value { font-size: 0.95rem; color: #212529; }

/* Image */
.acf-responsive-img { max-width: 100%; height: auto; border-radius: 4px; display: block; }

/* Button */
.acf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #007bff;
    background-color: transparent;
    border: 1px solid #007bff;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.acf-btn:hover { color: #fff; background-color: #007bff; text-decoration: none; }

/* Gallery */
.acf-gallery-container { display: flex; flex-wrap: wrap; gap: 8px; }
.acf-gallery-link { cursor: zoom-in; display: block; }
.acf-gallery-thumb {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 3px;
    background-color: #fff;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: block;
}
.acf-gallery-thumb:hover {
    transform: scale(1.05);
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

/* Color */
.acf-color-display { display: inline-flex; align-items: center; gap: 8px; }
.acf-color-box {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    vertical-align: middle;
}
.acf-color-value { font-family: monospace; font-size: 0.9rem; color: #495057; }

/* Lists */
.acf-list-unstyled { padding-left: 0; list-style: none; margin: 0; }
.acf-list-unstyled li { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.acf-check-icon { color: #28a745; }

/* =====================
   Lightbox Modal
   ===================== */
.acf-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.88);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.acf-lightbox-overlay.is-open { display: flex; }

.acf-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acf-lightbox-img {
    max-width: 88vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    display: block;
    user-select: none;
}

.acf-lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 100000;
}
.acf-lightbox-close:hover { background: rgba(255,255,255,0.3); }

.acf-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 50px;
    height: 60px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 100000;
}
.acf-lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.acf-lightbox-prev { left: 12px; }
.acf-lightbox-next { right: 12px; }

.acf-lightbox-counter {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    background: rgba(0,0,0,0.4);
    padding: 4px 12px;
    border-radius: 20px;
    pointer-events: none;
}

.acf-lightbox-nav.is-hidden { display: none; }
