/**
 * Admin CSS for YoApy Social Poster
 *
 * @package YoApySocialPoster
 * @since 1.6.0
 */
.yoapsopo-wrap .notice,
.wrap .notice,
div.notice,
.notice {
    border-radius: 12px !important;
    padding: 12px 14px !important;
    margin: 16px 0 !important;
    border-left: 4px solid;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.yoapsopo-wrap .notice p,
.wrap .notice p,
div.notice p,
.notice p {
    margin: 0 !important;
    color: inherit !important;
    font-weight: 500;
    line-height: 1.5;
}

.yoapsopo-wrap .notice a,
.wrap .notice a,
div.notice a,
.notice a {
    color: inherit !important;
    text-decoration: underline;
    font-weight: 600;
}

.yoapsopo-wrap .notice-success,
.wrap .notice-success,
div.notice-success,
.notice-success {
    background: #ecfdf5 !important;
    border-left-color: #10b981 !important;
    color: #065f46 !important;
}

.yoapsopo-wrap .notice-warning,
.wrap .notice-warning,
div.notice-warning,
.notice-warning {
    background: #fffbeb !important;
    border-left-color: #f59e0b !important;
    color: #92400e !important;
}

.yoapsopo-wrap .notice-error,
.wrap .notice-error,
div.notice-error,
.notice-error {
    background: #fef2f2 !important;
    border-left-color: #ef4444 !important;
    color: #991b1b !important;
}

.yoapsopo-wrap .notice-info,
.wrap .notice-info,
div.notice-info,
.notice-info {
    background: #eff6ff !important;
    border-left-color: #3b82f6 !important;
    color: #1e40af !important;
}

.yoapsopo-wrap .is-dismissible .notice-dismiss,
.wrap .is-dismissible .notice-dismiss,
div.is-dismissible .notice-dismiss,
.is-dismissible .notice-dismiss {
    top: 8px !important;
    right: 8px !important;
    color: inherit !important;
    opacity: 0.7;
}

.yoapsopo-wrap .is-dismissible .notice-dismiss:hover,
.wrap .is-dismissible .notice-dismiss:hover,
div.is-dismissible .notice-dismiss:hover,
.is-dismissible .notice-dismiss:hover {
    opacity: 1;
}

/* Specific override for any white text issues */
.notice-warning *,
.notice-warning p,
.notice-warning a {
    color: #92400e !important;
}

.notice-error *,
.notice-error p,
.notice-error a {
    color: #991b1b !important;
}

.notice-success *,
.notice-success p,
.notice-success a {
    color: #065f46 !important;
}

.notice-info *,
.notice-info p,
.notice-info a {
    color: #1e40af !important;
}

/* Layout Components */
.yoapsopo-wrap .yoapsopo-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.45fr;
    gap: 24px;
    margin-top: 8px;
}

.yoapsopo-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.yoapsopo-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.yoapsopo-card h2 {
    margin: 0 0 12px;
    font-size: 20px;
    color: #1e293b;
    font-weight: 600;
}

.yoapsopo-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

/* Modern Section Headers */
.yoapsopo-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.yoapsopo-section-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}

.yoapsopo-section-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Form Components */
.yoapsopo-field {
    margin-bottom: 16px;
}

.yoapsopo-field.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.yoapsopo-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
}

.yoapsopo-input,
.yoapsopo-select,
.yoapsopo-textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.yoapsopo-input:focus,
.yoapsopo-select:focus,
.yoapsopo-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.yoapsopo-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Status & Badge Components */
.yoapsopo-chips .chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 6px 10px;
    margin-right: 8px;
    margin-bottom: 6px;
    background: #fff;
}

.badge {
    display: inline-block;
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
    padding: 2px 8px;
    margin-right: 4px;
    font-size: 12px;
    border: 1px solid #c7d2fe;
}

.status {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.status-complete {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.status-processing {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.status-error {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Action Components */
.yoapsopo-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}

.yoapsopo-actions-cell .button {
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Modern Button Styles */
.yoapsopo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
}

.yoapsopo-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.yoapsopo-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.yoapsopo-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.yoapsopo-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.yoapsopo-btn-danger {
    background: #ef4444;
    color: white !important;
    /* Force white text by default */
    border: 1px solid #ef4444;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.yoapsopo-btn-danger:hover {
    background: white;
    /* White background on hover */
    color: #dc2626 !important;
    /* Red text on hover */
    border: 1px solid #dc2626;
    /* Red border on hover */
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
}

/* Compact Button Styles for Tasks Table */
.yoapsopo-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

.yoapsopo-btn-xs {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* Preview Components */
.yoapsopo-preview {
    margin-top: 20px;
}

.yoapsopo-preview-box {
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    padding: 12px;
    background: #fafafa;
}

.yoapsopo-preview-box .text {
    white-space: pre-wrap;
    margin-top: 8px;
}

/* Table Components */
.yoapsopo-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.yoapsopo-tasks-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    table-layout: fixed;
}

.yoapsopo-tasks-table thead {
    background: #f8fafc;
}

.yoapsopo-tasks-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.yoapsopo-tasks-table td {
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    vertical-align: top;
}

.yoapsopo-tasks-table tr:hover td {
    background-color: #f8fafc;
}

/* Task Table Column Widths */
.yoapsopo-tasks-table th:nth-child(1),
.yoapsopo-tasks-table td:nth-child(1) {
    width: 25%;
}

.yoapsopo-tasks-table th:nth-child(2),
.yoapsopo-tasks-table td:nth-child(2) {
    width: 15%;
}

.yoapsopo-tasks-table th:nth-child(3),
.yoapsopo-tasks-table td:nth-child(3) {
    width: 40%;
}

.yoapsopo-tasks-table th:nth-child(4),
.yoapsopo-tasks-table td:nth-child(4) {
    width: 20%;
}

/* CTA Components */
.yoapsopo-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 8px 0;
}

.yoapsopo-cta .icon {
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 782px) {
    .yoapsopo-wrap .yoapsopo-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .yoapsopo-field.two {
        grid-template-columns: 1fr;
    }

    .yoapsopo-actions-mobile {
        flex-direction: column;
        align-items: stretch;
    }

    .yoapsopo-actions-mobile .button {
        width: 100%;
    }

    .yoapsopo-card {
        border-radius: 12px;
        padding: 12px;
    }

    .yoapsopo-table thead {
        display: none;
    }

    .yoapsopo-table tr {
        display: block;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 10px;
        margin-bottom: 10px;
    }

    .yoapsopo-table td {
        display: flex;
        justify-content: space-between;
        padding: 6px 8px;
        border: none;
    }

    .yoapsopo-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #374151;
        margin-right: 10px;
    }

    #yoapsopo_tasks_tbody tr td:nth-child(1) {
        display: block;
    }

    .yoapsopo-actions-cell {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .yoapsopo-actions-cell .button {
        flex: 1 0 32%;
    }
}

/* Garante que a pré-visualização não sobreponha os menus ou a barra de admin */
.yoapsopo-wrap .yoapsopo-device {
    position: relative;
    z-index: 900;
    /* Um valor alto, mas inferior ao do menu do WP */
}

/* Garante que o menu de pré-visualização fique acima da pré-visualização do dispositivo */
.yoapsopo-wrap #yoapsopo_prev_modes {
    position: relative;
    z-index: 950;
    /* Um valor maior que o do dispositivo, para que fique na frente */
    background-color: #fff;
    /* Adiciona um fundo para evitar transparência */
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Ajuste para o contêiner principal do planner se necessário */
.yoapsopo-wrap {
    position: relative;
    z-index: 1;
}

/* Prevenção de conflitos com a barra de admin do WordPress */
body.admin-bar .yoapsopo-wrap .yoapsopo-device.sticky {
    top: 32px;
    /* Ajusta a posição se a pré-visualização for fixa */
}

/* SMOOTH ANIMATIONS FOR UI ELEMENTS */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    }
}

/* Real-time input feedback */
input:focus,
textarea:focus,
select:focus {
    animation: pulseGlow 2s infinite;
    border-color: rgba(59, 130, 246, 0.5) !important;
}

/* Enhanced character counter with live updates */
#yoapsopo_char {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 6px 12px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    color: #3b82f6;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Enhanced form elements */
input[type="text"],
input[type="url"],
input[type="datetime-local"],
select,
textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:hover,
input[type="url"]:hover,
input[type="datetime-local"]:hover,
select:hover,
textarea:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

/* Enhanced dropzone interactions */
.yoapsopo-dz {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.yoapsopo-dz:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.02));
}

.yoapsopo-dz.dragover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.2);
}

/* ================== ESTRUTURA DO PREVIEW ================== */

/* Container do "Celular" (Device) */
.yoapsopo-device {
    position: relative;
    background: #111;
    border: 1px solid #444;
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), inset 0 0 2px #fff3;
    padding: 12px;
    transition: width 0.4s ease-in-out, max-width 0.4s ease-in-out;
    width: 100%;
    max-width: 360px;
    /* Largura padrão para modo vertical */
}

/* Orientação do Celular (Controlado por data-mode via JS) */
.yoapsopo-device[data-mode="youtube"] {
    max-width: 640px;
    /* Largura para modo horizontal */
}

/* Responsive Utilities */


.hidden {
    display: none !important;
}

.block {
    display: block !important;
}

@media (min-width: 768px) {
    .md\:block {
        display: block !important;
    }

    .md\:hidden {
        display: none !important;
    }

    .md\:flex {
        display: flex !important;
    }

    .md\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    .md\:flex-row {
        flex-direction: row !important;
    }

    .md\:items-center {
        align-items: center !important;
    }

    .md\:justify-between {
        justify-content: space-between !important;
    }
}

/* A "Tela" do Celular */
.yoapsopo-ar {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: var(--yoapsopo-ar, 177.77%);
    /* Proporção padrão 9:16 */
    background: #000;
    border-radius: 28px;
    overflow: hidden;
}

.yoapsopo-ar-obj {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Container de cada preview individual (ex: Facebook, Instagram) */
.preview-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.preview-container:not(.hidden) {
    opacity: 1;
    z-index: 2;
}


/* ================== BOTÕES DE MODO (PILLS) ================== */
.yoapsopo-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.yoapsopo-pill:hover {
    border-color: #38bdf8;
    background: #f0f9ff;
    color: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.yoapsopo-pill.yoapsopo-pill--active {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
    transform: translateY(-1px);
}

.wrap .notice {
    border-radius: 12px;
    padding: 12px 14px;
}

.wrap .notice p {
    margin: 0;
    color: inherit !important;
}

.wrap .notice a {
    color: inherit;
    text-decoration: underline;
}

.wrap .notice-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.wrap .notice-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.wrap .notice-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.wrap .is-dismissible .notice-dismiss {
    filter: invert(0);
}


/* ================== ESTILOS GERAIS PARA MÍDIA ================== */

/* O "Palco" da Mídia */
.fb-media,
.ig-media,
.story-media,
.reels-media,
.tiktok-media,
.youtube-media-layer,
.shorts-media {
    position: relative;
    /* Essencial para o posicionamento absoluto dos filhos */
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    overflow: hidden;
}

/* A Mídia em si (Imagem ou Vídeo) */
.fb-image,
.fb-video,
.ig-image,
.ig-video,
.story-image,
.story-video,
.reels-image,
.reels-video,
.tiktok-image,
.tiktok-video,
.youtube-image,
.youtube-video,
.shorts-image,
.shorts-video {
    /* ===== A MÁGICA ESTÁ AQUI ===== */
    position: absolute;
    /* Sobrepõe os elementos */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Começam invisíveis para evitar a imagem quebrada */
    display: none;
}

/* ================== FACEBOOK PREVIEW ================== */
.facebook-post {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
}

.fb-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.fb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e4e6eb;
}

.fb-info {
    flex: 1;
}

.fb-name {
    font-size: 15px;
    font-weight: 600;
    color: #050505;
}

.fb-time {
    font-size: 13px;
    color: #65676b;
}

.fb-menu {
    font-size: 20px;
    color: #65676b;
    cursor: pointer;
}

.fb-text {
    padding: 4px 16px 16px;
    font-size: 15px;
    line-height: 1.33;
    color: #050505;
    white-space: pre-wrap;
}

.fb-media {
    position: relative;
    flex: 1;
}

/* Mantido para ocupar espaço */
.fb-actions {
    padding: 4px 16px 12px;
    background: #fff;
    flex-shrink: 0;
}

.fb-stats {
    font-size: 13px;
    color: #65676b;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e4e6ea;
}

.fb-buttons {
    display: flex;
    justify-content: space-around;
    padding-top: 6px;
}

.fb-btn {
    color: #65676b;
    font-size: 14px;
    font-weight: 600;
    padding: 8px;
    cursor: pointer;
    flex: 1;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.fb-btn:hover {
    background-color: #f2f3f4;
}

/* ================== INSTAGRAM FEED STYLES ================== */
.ig-post {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
}

.ig-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
    border-bottom: 1px solid #dbdbdb;
}

.ig-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #e4e6eb;
}

.ig-username-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ig-username {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
}

.ig-verified {
    width: 14px;
    height: 14px;
}

.ig-menu {
    width: 24px;
    height: 24px;
    color: #262626;
    cursor: pointer;
}

.ig-media {
    position: relative;
    flex: 1;
}

.ig-actions {
    padding: 12px 16px;
    background: #fff;
    text-align: left;
}

.ig-action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ig-left-actions {
    display: flex;
    gap: 16px;
}

.ig-action-btn,
.ig-save {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.ig-action-btn svg,
.ig-save svg {
    width: 24px;
    height: 24px;
    color: #262626;
}

.ig-likes {
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 8px;
}

.ig-caption {
    font-size: 14px;
    color: #262626;
    margin-bottom: 8px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.ig-caption-username {
    margin-right: 6px;
}

.ig-time {
    font-size: 12px;
    color: #8e8e8e;
    text-transform: uppercase;
}

/* ================== YOUTUBE PLAYER STYLES ================== */
.youtube-player {
    position: relative;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #000;
    color: #fff;
}

.youtube-gradient-top,
.youtube-gradient-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 50%;
    pointer-events: none;
    z-index: 1;
}

.youtube-gradient-top {
    top: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
}

.youtube-gradient-bottom {
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent);
}

.youtube-ui-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 18px;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.youtube-top-bar .youtube-title {
    font-size: 18px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.youtube-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
}

.youtube-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.youtube-channel-info-overlay {
    display: flex;
    align-items: center;
    gap: 10px;
}

.youtube-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #aaa;
    flex-shrink: 0;
}

.youtube-channel-name {
    font-size: 14px;
    font-weight: 500;
}

.youtube-subscribers {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.youtube-actions-overlay .youtube-subscribe {
    background: #fff;
    color: #0f0f0f;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.youtube-subscribe:hover {
    background-color: #f2f2f2;
}

/* ================== ESTILOS VERTICAIS (REELS, STORIES, ETC.) ================== */
.story-container,
.reels-container,
.tiktok-container,
.shorts-container {
    position: relative;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
}

.story-header,
.reels-header,
.tiktok-header,
.shorts-header {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    justify-content: space-between;
}

.story-avatar,
.reels-avatar,
.tiktok-avatar,
.shorts-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #555;
    border: 2px solid #fff;
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: center;
}

.story-username,
.reels-username,
.tiktok-username,
.shorts-channel {
    font-weight: 600;
}

.story-text,
.reels-caption,
.tiktok-caption,
.shorts-title {
    position: absolute;
    bottom: 80px;
    left: 15px;
    right: 15px;
    z-index: 10;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    white-space: pre-wrap;
}

.reels-right-actions,
.tiktok-right-actions,
.shorts-right-actions {
    position: absolute;
    bottom: 80px;
    right: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.action-count {
    font-size: 12px;
}


/* Toggles modernos para checkboxes */
.yoapsopo-track {
    position: relative;
    height: 1.5rem;
    /* 24px */
    width: 2.75rem;
    /* 44px */
    border-radius: 9999px;
    background-color: #e5e7eb;
    /* cinza-200 */
    transition: background-color 0.2s ease-in-out;
}

.yoapsopo-thumb {
    position: absolute;
    left: 2px;
    top: 2px;
    height: 1.25rem;
    /* 20px */
    width: 1.25rem;
    /* 20px */
    border-radius: 9999px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

input:checked+.yoapsopo-track .yoapsopo-thumb {
    transform: translateX(1.25rem);
    /* 20px */
}

input:disabled+.yoapsopo-track {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dropzone (Área de Arrastar e Soltar) */
.yoapsopo-dz {
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    background-color: #f9fafb;
    cursor: pointer;
}

.yoapsopo-dz-inner {
    color: #6b7280;
}

.yoapsopo-dz-ic {
    font-size: 1.5rem;
}

.yoapsopo-dz-title {
    font-weight: 600;
    color: #374151;
    margin-top: 0.5rem;
}

.yoapsopo-dz-sub {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.yoapsopo-dz-browse {
    color: #0ea5e9;
    font-weight: 500;
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
}

.yoapsopo-dz-progress {
    margin-top: 0.75rem;
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.yoapsopo-dz-progress>span {
    display: block;
    height: 100%;
    width: 0%;
    background: #0ea5e9;
    transition: width .2s ease;
}

.yoapsopo-net-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    text-transform: capitalize;
}

.yoapsopo-net--facebook-chip {
    background-color: #eef2ff;
    color: #3b82f6;
    border-color: #c7d2fe;
}

.yoapsopo-net--instagram-chip {
    background-color: #fdf2f8;
    color: #e11d48;
    border-color: #fbcfe8;
}

.yoapsopo-net--youtube-chip {
    background-color: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

.yoapsopo-net--tiktok-chip {
    background-color: #f1f5f9;
    color: #1e293b;
    border-color: #e2e8f0;
}

/* Status badge styles */
.yoapsopo-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.yoapsopo-status--pending {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.yoapsopo-status--processing {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.yoapsopo-status--scheduled {
    background: #ede9fe;
    border: 1px solid #ddd6fe;
    color: #5b21b6;
}

.yoapsopo-status--complete {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.yoapsopo-status--error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.yoapsopo-result-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0ea5e9;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f0f9ff;
    transition: background-color .2s;
}

.yoapsopo-result-link:before {
    content: '🔗';
}

.yoapsopo-result-link:hover {
    background-color: #e0f2fe;
    text-decoration: none;
}

.yoapsopo-result-error {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ef4444;
    cursor: help;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #fef2f2;
}

.yoapsopo-result-error:before {
    content: '⚠️';
}

.yoapsopo-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    margin-right: 6px;
    font-size: 12px
}

.yoapsopo-badge--muted {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151
}

.yoapsopo-mini {
    opacity: .85
}

.yoapsopo-json {
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin: 8px 0 0
}

.yoapsopo-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    padding: 6px 10px
}

.yoapsopo-chip--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46
}

.yoapsopo-chip--warn {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e
}

.yoapsopo-chip--info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af
}

.yoapsopo-chip--muted {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151
}

.yoapsopo-chip--error {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b
}

.yoapsopo-links .button-small {
    padding: 2px 8px;
    border-radius: 999px;
    height: auto;
    line-height: 1.6
}

.yoapsopo-net {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
    min-height: 28px;
}

.yoapsopo-net:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.yoapsopo-net span {
    line-height: 1.3;
    vertical-align: middle;
}

/* Network-specific styles with better contrast */
.yoapsopo-net--facebook {
    background: linear-gradient(135deg, #1877f2, #0d5cb6);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.yoapsopo-net--instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.yoapsopo-net--youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.yoapsopo-net--tiktok {
    background: linear-gradient(135deg, #000000, #111111);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* responsivo: cards quando tela estreita */
@media (max-width: 782px) {
    #yoapsopoLogTable thead {
        display: none
    }

    #yoapsopoLogTable tr {
        display: block;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 10px
    }

    #yoapsopoLogTable td {
        display: block;
        border: none;
        padding: 6px 0
    }

    #yoapsopoLogTable td code {
        white-space: normal
    }
}

button,
input,
select,
textarea {
    /* box-sizing: border-box; */
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    background: none;
    color: #fff;
    border: none;
}

/* YoApy Social Poster Metabox Styles */
.yoapsopo-metabox-wrapper {
    padding: 10px 0;
    max-width: 100%;
    box-sizing: border-box;
}

.yoapsopo-notice-warning {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
}

.yoapsopo-notice-warning-box {
    background: #fffbeb !important;
    border-left: 4px solid #f59e0b !important;
    color: #92400e !important;
    padding: 12px 14px !important;
    border-radius: 8px !important;
    margin: 12px 0 !important;
}

.yoapsopo-notice-warning-box p {
    margin: 0 !important;
    color: #92400e !important;
    font-weight: 500;
}

.yoapsopo-section {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    max-width: 100%;
    box-sizing: border-box;
}

.yoapsopo-section:last-child {
    margin-bottom: 0;
}

.yoapsopo-field {
    margin-bottom: 10px;
    max-width: 100%;
    box-sizing: border-box;
}

.yoapsopo-field:last-child {
    margin-bottom: 0;
}

.yoapsopo-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.yoapsopo-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.yoapsopo-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.yoapsopo-select,
.yoapsopo-input,
.yoapsopo-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    /* Ensure padding is included in width calculation */
    max-width: 100%;
    /* Prevent overflow */
    min-width: 0;
    /* Allow shrinking */
}

.yoapsopo-select:focus,
.yoapsopo-input:focus,
.yoapsopo-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.yoapsopo-textarea {
    min-height: 80px;
    resize: vertical;
}

.yoapsopo-networks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.yoapsopo-network-checkbox {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.yoapsopo-network-checkbox:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.yoapsopo-network-checkbox input[type="checkbox"] {
    margin-right: 6px;
}

.yoapsopo-media-section {
    background: #fff;
}

.yoapsopo-media-field {
    margin-bottom: 15px;
}

.yoapsopo-media-field:last-child {
    margin-bottom: 0;
}

.yoapsopo-preview-image,
.yoapsopo-preview-video {
    margin-top: 10px;
}

.yoapsopo-preview-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.yoapsopo-preview-video video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.yoapsopo-help-text {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.yoapsopo-help-text.error {
    color: #ef4444;
    font-weight: bold;
}

.yoapsopo-pick {
    margin-top: 6px;
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.yoapsopo-pick:hover {
    background: #2563eb;
}

/* YoApy Social Poster Logs Page Styles */
.yoapsopo-logs-header {
    border-radius: 16px !important;
    margin-bottom: 20px !important;
    padding: 20px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.yoapsopo-logs-header h1 {
    font-size: 24px !important;
    margin-bottom: 8px !important;
}

.yoapsopo-logs-header p {
    font-size: 16px !important;
    opacity: 0.9 !important;
}

.yoapsopo-logs-actions {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.yoapsopo-logs-actions .button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.yoapsopo-logs-actions .button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.yoapsopo-logs-tip {
    color: #64748b;
    font-size: 14px;
}

.yoapsopo-logs-tip em {
    font-weight: 600;
    color: #3b82f6;
}

/* Log Item Cards */
.yoapsopo-log-card {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease-in-out !important;
}

.yoapsopo-log-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px) !important;
}

.yoapsopo-log-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.yoapsopo-log-timestamp {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.yoapsopo-log-title {
    font-family: monospace;
    font-size: 13px;
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.yoapsopo-log-summary {
    margin-bottom: 16px;
}

.yoapsopo-log-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.yoapsopo-log-toggle:hover {
    background: #dbeafe;
    transform: translateY(-1px);
}

.yoapsopo-log-toggle .dashicons {
    font-size: 16px;
}

.yoapsopo-log-details {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    margin-top: 12px;
}

.yoapsopo-log-details pre {
    background: #0f172a;
    color: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    margin: 0;
}

.yoapsopo-log-delete {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid #fecaca !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}

.yoapsopo-log-delete:hover {
    background: #fecaca !important;
    transform: translateY(-1px) !important;
}

.yoapsopo-log-delete .dashicons {
    font-size: 16px !important;
}

/* Table Styles */
.yoapsopo-logs-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.yoapsopo-logs-table thead {
    background: #f8fafc;
}

.yoapsopo-logs-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.yoapsopo-logs-table tbody tr {
    background: #fff;
    transition: background 0.2s;
}

.yoapsopo-logs-table tbody tr:hover {
    background: #f8fafc;
}

.yoapsopo-logs-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.yoapsopo-logs-table tbody tr:last-child td {
    border-bottom: none;
}

/* Pagination Styles */
.yoapsopo-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.yoapsopo-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.yoapsopo-pagination .page-numbers:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.yoapsopo-pagination .page-numbers.current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.yoapsopo-pagination .page-numbers.prev,
.yoapsopo-pagination .page-numbers.next {
    background: #fff;
    border-color: #e2e8f0;
}

.yoapsopo-pagination .page-numbers.prev:hover,
.yoapsopo-pagination .page-numbers.next:hover {
    background: #f1f5f9;
}

.yoapsopo-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    color: #94a3b8;
}

/* Per Page Selector */
.yoapsopo-per-page {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.yoapsopo-per-page label {
    font-weight: 500;
    color: #334155;
}

.yoapsopo-per-page select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.yoapsopo-per-page select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Planner Tasks Pagination */
.yoapsopo-tasks-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.yoapsopo-tasks-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.yoapsopo-tasks-pagination .page-numbers:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.yoapsopo-tasks-pagination .page-numbers.current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.yoapsopo-tasks-pagination .page-numbers.prev,
.yoapsopo-tasks-pagination .page-numbers.next {
    background: #fff;
    border-color: #e2e8f0;
}

.yoapsopo-tasks-pagination .page-numbers.prev:hover,
.yoapsopo-tasks-pagination .page-numbers.next:hover {
    background: #f1f5f9;
}

.yoapsopo-tasks-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    color: #94a3b8;
}

/* Settings Page Specific Styles */
.yoapsopo-settings-header {
    background: linear-gradient(135deg, #0ea5e9, #7c3aed);
    border-radius: 1rem;
    padding: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.yoapsopo-settings-cta {
    background: linear-gradient(to right, #f0f9ff, #e0e7ff);
    border: 1px solid #bae6fd;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.yoapsopo-settings-cta p {
    margin: 0;
}

.yoapsopo-settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .yoapsopo-settings-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.yoapsopo-settings-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.yoapsopo-settings-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.yoapsopo-settings-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.yoapsopo-settings-card-header h2,
.yoapsopo-settings-card-header h3 {
    margin: 0;
    font-weight: 600;
}

.yoapsopo-settings-card-body {
    padding: 1.5rem;
}

.yoapsopo-settings-form-group {
    margin-bottom: 1.5rem;
}

.yoapsopo-settings-form-group:last-child {
    margin-bottom: 0;
}

.yoapsopo-settings-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #334155;
    font-size: 0.875rem;
}

.yoapsopo-settings-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.yoapsopo-settings-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.yoapsopo-settings-help-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.yoapsopo-settings-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
}

.yoapsopo-settings-step-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.yoapsopo-settings-step-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.yoapsopo-settings-step-item:last-child {
    margin-bottom: 0;
}

.yoapsopo-settings-step-number {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.yoapsopo-settings-notice {
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 0;
}

/* Enhanced button styles for settings page */
.yoapsopo-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
}

.yoapsopo-settings-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.yoapsopo-settings-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.yoapsopo-settings-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.yoapsopo-settings-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.yoapsopo-settings-btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 0.375rem;
}

/* Responsive improvements for settings page */
@media (max-width: 768px) {
    .yoapsopo-settings-header {
        padding: 1.25rem;
    }

    .yoapsopo-settings-card-body {
        padding: 1.25rem;
    }

    .yoapsopo-settings-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .yoapsopo-settings-step-item {
        gap: 0.5rem;
    }
}

/* Modal styles */
.yoapsopo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.yoapsopo-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.yoapsopo-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.yoapsopo-modal-overlay.active .yoapsopo-modal {
    transform: translateY(0);
}

.yoapsopo-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.yoapsopo-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.yoapsopo-modal-content {
    padding: 20px 24px;
}

.yoapsopo-modal-content p {
    margin: 0 0 16px 0;
    color: #4b5563;
    line-height: 1.5;
}

.yoapsopo-modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e5e7eb;
}

.yoapsopo-modal-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.yoapsopo-modal-btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #e5e7eb;
}

.yoapsopo-modal-btn-cancel:hover {
    background: #e5e7eb;
}

.yoapsopo-modal-btn-confirm {
    background: #ef4444;
    color: white;
}

.yoapsopo-modal-btn-confirm:hover {
    background: #dc2626;
}

/* TikTok specific styles */
.yoapsopo-tiktok-fields {
    background: #fffbe6;
    border: 1px solid #ffd591;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.yoapsopo-tiktok-fields h4 {
    margin-top: 0;
    color: #fa8c16;
    font-size: 1.1rem;
    font-weight: 600;
}

.yoapsopo-tiktok-fields .yoapsopo-field {
    margin-bottom: 1rem;
}

.yoapsopo-tiktok-fields .yoapsopo-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.yoapsopo-tiktok-fields .yoapsopo-select,
.yoapsopo-tiktok-fields .yoapsopo-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    /* Ensure padding is included in width calculation */
    max-width: 100%;
    /* Prevent overflow */
    min-width: 0;
    /* Allow shrinking */
}

.yoapsopo-tiktok-fields .yoapsopo-help-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.yoapsopo-tiktok-fields .yoapsopo-track {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    background-color: #e5e7eb;
    border-radius: 10px;
    vertical-align: middle;
    transition: background-color 0.2s;
}

.yoapsopo-tiktok-fields .yoapsopo-track.yoapsopo-track--on {
    background-color: #3b82f6;
}

.yoapsopo-tiktok-fields .yoapsopo-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.yoapsopo-tiktok-fields .yoapsopo-track--on .yoapsopo-thumb {
    transform: translateX(20px);
}

.yoapsopo-tiktok-fields #yoapsopo_tiktok_commercial_options {
    margin-top: 0.5rem;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.yoapsopo-tiktok-fields .commercial-option {
    margin-bottom: 10px;
}

.yoapsopo-tiktok-fields .commercial-option:last-child {
    margin-bottom: 0;
}

.yoapsopo-tiktok-fields .commercial-option label {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.yoapsopo-tiktok-fields .commercial-option .yoapsopo-help-text {
    margin: 0 0 0 24px;
    font-size: 12px;
    color: #6b7280;
}

.yoapsopo-tiktok-fields .consent-label {
    display: flex;
    align-items: flex-start;
}

.yoapsopo-tiktok-fields .consent-label input[type="checkbox"] {
    margin-top: 3px;
}

.yoapsopo-tiktok-fields .consent-label span {
    margin-left: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}