/*******************/
/*INPUTS ACF*/
/*******************/
.acf-input input[type="text"]:not(.select2-search__field),
.acf-input input[type="email"],
.acf-input input[type="url"],
.acf-input input[type="password"],
.acf-input input[type="number"],
.acf-input input[type="tel"]{
    background-color: #242424;
    padding: 10px 12px;
    border: 2px solid #a0a0a0!important;
    border-radius: 6px!important;
    font-size: 16px!important;
    min-height: 40px!important;
    color: #e8d7a5!important;
}

.acf-input input[type="text"]:not(.select2-search__field):focus,
.acf-input input[type="email"]:focus,
.acf-input input[type="url"]:focus,
.acf-input input[type="password"]:focus,
.acf-input input[type="number"]:focus {
    border-color: #d4af37!important;
    box-shadow: none!important;
}

.acf-input .acf-url i {
    top: 11px!important;
}

/* ── Select2 single (provincia, localidad, país) ── */
.acf-input .select2-container--default .select2-selection--single {
    background-color: #242424 !important;
    border: 2px solid #a0a0a0 !important;
    border-radius: 6px !important;
    height: 44px !important;
}

.acf-input .select2-container--default.select2-container--focus .select2-selection--single,
.acf-input .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #d4af37 !important;
    box-shadow: none !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 15px;
    padding-right: 43px !important;
    line-height: 40px !important;
    color: #e8d7a5 !important;
    font-size: 16px !important;
}

.acf-input .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 6px !important;
}

.acf-input .select2-container--default .select2-selection--single .select2-selection__clear {
    float: right !important;
    margin-right: 17px !important;
    color: #a0a0a0 !important;
    font-size: 18px !important;
    line-height: 40px !important;
}

.acf-input .select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #d4af37 !important;
}

.acf-input .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #a0a0a0 transparent transparent transparent !important;
}

.acf-input .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #d4af37 transparent !important;
}

/* Estado cargando / disabled */
.acf-input .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #1a1a1a !important;
    border-color: #555 !important;
    cursor: wait !important;
}

.acf-input .select2-container--disabled .select2-selection__rendered {
    color: #888 !important;
}

/* Dropdown */
.select2-dropdown {
    background-color: #1e1e1e !important;
    border: 2px solid #d4af37 !important;
    border-radius: 6px !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: #2e2e2e !important;
    border: 1px solid #a0a0a0 !important;
    border-radius: 4px !important;
    color: #e8d7a5 !important;
    padding: 6px 10px !important;
}

.select2-results__option {
    color: #e8d7a5 !important;
    padding: 8px 15px !important;
    font-size: 15px !important;
}

/* Hover (opciones normales) — el seleccionado lo gestiona JS para ganar a ACF */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #d4af37 !important;
    color: #0e0e0e !important;
}

.select2-results__option[aria-disabled="true"] {
    color: #666 !important;
}

.select2-container--default .select2-selection--multiple {
    background-color: #242424!important;
    border: 2px solid #a0a0a0!important;
    border-radius: 6px!important;
    font-size: 16px!important;
    cursor: text;
}


.select2-container.-acf .select2-selection--multiple .select2-selection__choice {
    background-color: #0e0e0e!important;
    border-color: #050505!important;
    color: #e8d7a5!important;
}

.acf-radio-list label{
    font-size: 16px!important;
    cursor: pointer;
}

.acf-input textarea {
    padding: 20px 20px!important;
    border: 2px solid #a0a0a0!important;
    border-radius: 6px!important;
    font-size: 16px!important;
    min-height: 300px!important;
}

.acf-input textarea:focus {
    border-color: #d4af37!important;
    box-shadow: none!important;
}

.acf-input .acf-gallery {
    border: 2px solid #a0a0a0!important;
    min-height: 400px!important;
    height: auto!important;
    border-radius: 6px!important;
    overflow: hidden!important;
}

.acf-input .acf-gallery-main{
    background-color: #242424!important;
}

.acf-gallery-sort{
    display: none!important;
}

.acf-gallery .acf-gallery-attachment {
    cursor: move!important;
    width: 105px!important;
    height: 140px!important;
}

.acf-gallery .acf-gallery-attachment .margin {
    border: 2px solid #a0a0a0!important;
    border-radius: 6px!important;
    background: #000000!important;
    height: 100%!important;
    overflow: hidden!important;
}

.acf-gallery .acf-gallery-attachment img {
    width: 100%!important;
    height: 100%!important;
    object-fit: cover!important;
    object-position: center top!important;
}

.acf-gallery .acf-icon.dark {
    background: #721010!important;
    color: #ffffff!important;
}

.acf-gallery .acf-gallery-toolbar {
    background-color: #0e0e0e!important;
    border-top: #d5d9dd solid 1px;
}
.acf-gallery .acf-gallery-add{
    background-color: #242424!important;
    font-size: 14px!important;
    font-weight: normal!important;
    color: #e8d7a5!important;
}
.acf-gallery .acf-gallery-add:hover{
    background-color: #e8d7a5!important;
    color: #0e0e0e!important;
}

/*******************/
/* DATEPICKER ACF - TEMA OSCURO */
/*******************/
.ui-datepicker {
    background-color: #1e1e1e !important;
    border: 1px solid #d4af37 !important;
    border-radius: 6px !important;
    color: #e8d7a5 !important;
    font-family: inherit !important;
    padding: 8px !important;
}
.ui-datepicker .ui-datepicker-header,
.ui-datepicker .ui-widget-header {
    background: #141414 !important;
    background-image: none !important;
    border: none !important;
    border-radius: 4px !important;
    color: #d4af37 !important;
    padding: 6px 0 !important;
}
.ui-datepicker .ui-datepicker-title {
    color: #d4af37 !important;
    font-weight: 600 !important;
}
.ui-datepicker .ui-datepicker-title select {
    background-color: #242424 !important;
    color: #d4af37 !important;
    border: 1px solid #555 !important;
    border-radius: 3px !important;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    background: none !important;
    background-image: none !important;
    border: none !important;
    cursor: pointer !important;
    top: 4px !important;
}
.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: none !important;
}
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    background-image: none !important;
    color: #d4af37 !important;
}
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    display: none !important;
}
.ui-datepicker .ui-datepicker-prev::after {
    content: "‹" !important;
    font-size: 20px !important;
    color: #d4af37 !important;
    line-height: 1 !important;
}
.ui-datepicker .ui-datepicker-next::after {
    content: "›" !important;
    font-size: 20px !important;
    color: #d4af37 !important;
    line-height: 1 !important;
}
.ui-datepicker table {
    width: 100% !important;
}
.ui-datepicker th {
    color: #a0a0a0 !important;
    font-weight: 600 !important;
    padding: 4px !important;
}
.ui-datepicker td {
    padding: 2px !important;
}
.ui-datepicker td a,
.ui-datepicker td span {
    background: none !important;
    border: none !important;
    color: #e8d7a5 !important;
    text-align: center !important;
    border-radius: 3px !important;
    padding: 4px !important;
    display: block !important;
}
.ui-datepicker td a:hover {
    background-color: #d4af37 !important;
    color: #0e0e0e !important;
}
.ui-datepicker td.ui-datepicker-today a,
.ui-datepicker td.ui-datepicker-today span {
    background-color: #2a2a2a !important;
    color: #d4af37 !important;
    border: 1px solid #d4af37 !important;
}
.ui-datepicker td.ui-state-active a,
.ui-datepicker td .ui-state-active {
    background-color: #d4af37 !important;
    color: #0e0e0e !important;
    font-weight: 600 !important;
}
.ui-datepicker td.ui-datepicker-other-month a {
    color: #555 !important;
}
.ui-datepicker-buttonpane {
    background-color: #141414 !important;
    border-top: 1px solid #333 !important;
}
.ui-datepicker-buttonpane button {
    background-color: #242424 !important;
    border: 1px solid #a0a0a0 !important;
    color: #e8d7a5 !important;
    border-radius: 3px !important;
    cursor: pointer !important;
}
.ui-datepicker-buttonpane button:hover {
    background-color: #d4af37 !important;
    color: #0e0e0e !important;
    border-color: #d4af37 !important;
}

/*******************/
/* FICHA ACF RESPONSIVE */
/*******************/

/* El select mobile siempre oculto en desktop */
.acf-tab-mobile-select {
    display: none;
}

@media (max-width: 782px) {

    /* Ocultar pestañas, mostrar select */
    .acf-fields > .acf-tab-wrap {
        display: none !important;
    }
    .acf-tab-mobile-select {
        display: block;
        width: 100%;
        background-color: #d4af37;
        color: #0e0e0e;
        border: 2px solid #b8952e;
        border-radius: 6px;
        font-size: 15px;
        font-weight: 700;
        padding: 10px 12px;
        margin-bottom: 12px;
        cursor: pointer;
        appearance: auto;
        letter-spacing: 0.03em;
    }

    /* Campos con ancho parcial (50%, 33%…): forzar ancho completo y quitar float */
    .acf-fields > .acf-field[data-width],
    .acf-fields > .acf-field {
        width: 100% !important;
        float: none !important;
        clear: both !important;
        padding: 14px 12px !important;
    }

    /* Reducir padding del botón de guardar */
    .acf-form-submit {
        padding-right: 12px !important;
        padding-top: 20px !important;
    }

    /* H2 dentro de las pestañas ACF */
    .acf-fields h2 {
        font-size: 1.2rem !important;
    }
}

/*******************/
/* MODAL MEDIOS WORDPRESS - TEMA OSCURO (solo frontend) */
/*******************/

/* Overlay */
.media-modal-backdrop {
    background: rgba(0, 0, 0, 0.85) !important;
}

/* Contenedor principal */
.media-modal,
.media-modal .media-frame {
    background: #1e1e1e !important;
}

/* Botón cerrar */
.media-modal-close {
    background: #141414 !important;
}
.media-modal-close:hover {
    background: #2a2a2a !important;
}
.media-modal-close .media-modal-icon::before {
    color: #e8d7a5 !important;
}

/* Menú lateral izquierdo */
.media-frame-menu,
.media-frame-menu .media-menu {
    background: #141414 !important;
    border-right-color: #333 !important;
}
.media-menu-item {
    color: #a0a0a0 !important;
    border-bottom-color: #2a2a2a !important;
}
.media-menu-item:hover {
    background: #242424 !important;
    color: #e8d7a5 !important;
}
.media-menu-item.active,
.media-menu-item.active:hover {
    background: #242424 !important;
    color: #d4af37 !important;
    box-shadow: inset -2px 0 0 #d4af37 !important;
}

/* Router: pestañas "Subir archivo / Biblioteca" */
.media-frame-router {
    background: #141414 !important;
    border-bottom-color: #333 !important;
}
.media-router .switch-view {
    color: #a0a0a0 !important;
    border-color: #333 !important;
    background: #141414 !important;
}
.media-router .switch-view:hover {
    color: #e8d7a5 !important;
    background: #242424 !important;
}
.media-router .switch-view.active {
    color: #d4af37 !important;
    background: #1e1e1e !important;
    border-bottom-color: #1e1e1e !important;
}

/* Área de contenido central */
.media-frame-content {
    background: #1e1e1e !important;
    border-color: #333 !important;
}

/* Grid de adjuntos */
.attachments-browser,
.attachments-browser .attachments {
    background: #1e1e1e !important;
}
.attachments-browser .media-toolbar {
    background: #141414 !important;
    border-bottom-color: #333 !important;
}

/* Búsqueda */
.media-search-input {
    background: #242424 !important;
    border-color: #555 !important;
    color: #e8d7a5 !important;
    border-radius: 4px !important;
}
.media-search-input:focus {
    border-color: #d4af37 !important;
    box-shadow: none !important;
}

/* Miniaturas individuales */
.attachment {
    background: #2a2a2a !important;
}
.attachment:focus,
.attachment.selected {
    box-shadow: 0 0 0 3px #d4af37 !important;
}
.attachment .thumbnail {
    background: #1a1a1a !important;
}
.attachment .filename {
    background: #1a1a1a !important;
    color: #a0a0a0 !important;
}

/* Zona de carga (drag & drop) */
.uploader-window {
    background: rgba(212, 175, 55, 0.04) !important;
    border-color: #d4af37 !important;
}
.uploader-window .uploader-window-content {
    color: #e8d7a5 !important;
}
.uploader-inline .uploader-status {
    background: #1e1e1e !important;
    color: #a0a0a0 !important;
}
.uploader-inline .upload-error {
    color: #dc3232 !important;
}

/* Barra lateral derecha (detalles del adjunto) */
.media-sidebar,
.attachment-details {
    background: #141414 !important;
    border-left-color: #333 !important;
}
.media-sidebar .attachment-info {
    border-bottom-color: #2a2a2a !important;
}
.media-sidebar .filename,
.media-sidebar .uploaded {
    color: #a0a0a0 !important;
}
.media-sidebar .filesize,
.media-sidebar .dimensions {
    color: #888 !important;
}

/* Labels e inputs en la barra lateral */
.media-sidebar label,
.describe label,
.attachment-details label {
    color: #a0a0a0 !important;
}
.media-sidebar input[type="text"],
.media-sidebar input[type="url"],
.media-sidebar textarea,
.describe input[type="text"],
.describe textarea {
    background: #242424 !important;
    border-color: #555 !important;
    color: #e8d7a5 !important;
    border-radius: 4px !important;
}
.media-sidebar input[type="text"]:focus,
.media-sidebar textarea:focus {
    border-color: #d4af37 !important;
    box-shadow: none !important;
}

/* Toolbar inferior */
.media-frame-toolbar,
.media-toolbar {
    background: #141414 !important;
    border-top-color: #333 !important;
}

/* Botón de selección / insertar */
.media-button-select,
.media-toolbar .button.media-button-select {
    background: #d4af37 !important;
    border-color: #b8952e !important;
    color: #0e0e0e !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
.media-button-select:hover {
    background: #c9a430 !important;
    border-color: #a07820 !important;
    color: #0e0e0e !important;
}

/* Botón secundario */
.media-toolbar .button:not(.media-button-select) {
    background: #242424 !important;
    border-color: #555 !important;
    color: #e8d7a5 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
.media-toolbar .button:not(.media-button-select):hover {
    background: #2e2e2e !important;
    color: #d4af37 !important;
}

/* Scrollbars */
.media-modal ::-webkit-scrollbar {
    width: 6px;
    background: #141414;
}
.media-modal ::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}
.media-modal ::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}