/*---------------------------------------------------------------*/
/*----------------------------- Admin ---------------------------*/
/*---------------------------------------------------------------*/
.pagenow-ks_m_advertisements #preview-action 
{
    display: none;
}

/* Card de Visibilidad y Estado en Metabox */
.ks-m-advertisements-visibility-card 
{
    background: #ffffff;
    border: 1px solid #dcdde1;
    border-left: 4px solid #259591;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 15px 0 22px 0;
    box-shadow: 0 2px 8px rgba(37, 149, 145, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ks-m-advertisements-visibility-card .ks-global-inputs-system-separator 
{
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(53, 31, 101, 0.12);
}

.ks-m-advertisements-visibility-card .ks-global-inputs-system-separator:last-child 
{
    padding-bottom: 0;
    border-bottom: none;
}

/* Columnas de Tabla en edit.php?post_type=ks_m_advertisements */
.post-type-ks_m_advertisements .column-ks_ad_thumb 
{
    width: 60px;
    text-align: center;
    vertical-align: middle;
}

.post-type-ks_m_advertisements .column-ks_ad_status 
{
    width: 140px;
    vertical-align: middle;
}

.post-type-ks_m_advertisements .column-ks_ad_mode 
{
    width: 190px;
    vertical-align: middle;
}

/* Miniatura en Tabla */
.ks-ad-table-thumb-wrapper 
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: #f0eef5;
    overflow: hidden;
}

.ks-ad-table-thumb 
{
    width: 44px;
    height: 44px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    border: 1px solid rgba(53, 31, 101, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ks-ad-table-thumb-empty 
{
    color: #351F65;
    opacity: 0.4;
    font-size: 18px;
    font-weight: 700;
}

/* Botón Quick Toggle de Estado */
.ks-ad-status-toggle 
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    min-width: 96px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    outline: none;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
    user-select: none;
}

.ks-ad-badge-active 
{
    background-color: #e6f5f4;
    color: #259591;
    border-color: rgba(37, 149, 145, 0.4);
}

.ks-ad-badge-active:hover,
.ks-ad-badge-active:focus 
{
    background-color: #d3efed;
    border-color: #259591;
    color: #259591;
}

.ks-ad-badge-inactive 
{
    background-color: #f0eef5;
    color: #351F65;
    border-color: rgba(53, 31, 101, 0.25);
}

.ks-ad-badge-inactive:hover,
.ks-ad-badge-inactive:focus 
{
    background-color: #e2dfec;
    border-color: #351F65;
    color: #351F65;
}

.ks-ad-status-toggle.is-loading 
{
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

/* Chips de Frecuencia y Modo */
.ks-ad-mode-chip 
{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 6px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.ks-ad-mode-button 
{
    background-color: #fcf1f5;
    color: #B55C80;
    border: 1px solid rgba(181, 92, 128, 0.3);
}

.ks-ad-mode-once 
{
    background-color: #f0eef5;
    color: #351F65;
    border: 1px solid rgba(53, 31, 101, 0.2);
}

.ks-ad-mode-always 
{
    background-color: #e6f5f4;
    color: #259591;
    border: 1px solid rgba(37, 149, 145, 0.3);
}

/* Botón Quick Toggle de Frecuencia */
.ks-ad-mode-toggle 
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    min-width: 140px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    outline: none;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
    user-select: none;
    white-space: nowrap;
}

.ks-ad-mode-toggle.ks-ad-mode-once 
{
    background-color: #f0eef5;
    color: #351F65;
    border-color: rgba(53, 31, 101, 0.25);
}

.ks-ad-mode-toggle.ks-ad-mode-once:hover,
.ks-ad-mode-toggle.ks-ad-mode-once:focus 
{
    background-color: #e2dfec;
    border-color: #351F65;
    color: #351F65;
}

.ks-ad-mode-toggle.ks-ad-mode-always 
{
    background-color: #e6f5f4;
    color: #259591;
    border-color: rgba(37, 149, 145, 0.4);
}

.ks-ad-mode-toggle.ks-ad-mode-always:hover,
.ks-ad-mode-toggle.ks-ad-mode-always:focus 
{
    background-color: #d3efed;
    border-color: #259591;
    color: #259591;
}

.ks-ad-mode-toggle.is-loading 
{
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

/* Reset Action for Admin Testing */
.ks-m-advertisements-reset-wrap 
{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed rgba(53, 31, 101, 0.12);
}

.ks-ad-btn-reset-browser 
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 16px;
    background-color: #f0eef5;
    color: #351F65;
    border: 1px solid rgba(53, 31, 101, 0.25);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.ks-ad-btn-reset-browser:hover,
.ks-ad-btn-reset-browser:focus 
{
    background-color: #e2dfec;
    border-color: #351F65;
    color: #351F65;
}

.ks-ad-btn-reset-browser .dashicons 
{
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    color: #259591;
}

.ks-ad-reset-status 
{
    font-size: 12px;
    font-weight: 600;
    color: #259591;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ks-ad-reset-status.is-visible 
{
    opacity: 1;
}

/*---------------------------------------------------------------*/
/*---------------------------- Public ---------------------------*/
/*---------------------------------------------------------------*/

#ks-m-public-advertisements-main-container
{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;

    opacity: 0;
    transition: all 1s;
}


.ks-m-public-advertisements-wrapper 
{
    position: relative;
    width: 100%;
    height: 100%;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9;
}

.ks-m-public-advertisements-background
{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    opacity: 0.5;
    cursor: pointer;
    z-index: -1;
}

.ks-m-public-advertisements-item
{
    position: relative;
    max-width: 1024px;
    width: calc(25vw + 25vh);
}

.ks-m-public-advertisements-link 
{
    position: relative;

}

.ks-m-public-advertisements-button-close 
{
    position: absolute;
    top: 0;
    right: 0;
    background: #ffffff;
    color: #666 !important;
    padding: 5px;
    z-index: 9;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
}

.ks-m-public-advertisements-button-close:hover, 
.ks-m-public-advertisements-button-close:focus 
{
    background: #f2f5fa;
}

.ks-m-public-advertisements-image 
{
    width: 100%;
}