/* Ocultar elementos de WordPress */
.pagination,
.site-footer,
.wp-site-blocks > footer,
.entry-footer,
.post-navigation,
.nav-links,
.entry-title,
.page .entry-title,
article > header,
.page-header,
.wp-block-post-title,
.wp-block-query-pagination,
.wp-block-post-template,
.wp-block-post,
.wp-block-template-part,
.navigation,
.posts-navigation,
.post-navigation,
.nav-links,
.wp-block-query-pagination,
.wp-block-post-content > .wp-block-query > .wp-block-post-template,
.wp-block-template-part header,
.wp-block-query-pagination-numbers,
.wp-block-query-pagination-next,
.wp-block-query-pagination-previous {
    display: none !important;
}

/* Remover espacios extra */
.site-main,
.wp-site-blocks,
.entry-content,
.wp-block-post-content,
article,
.post-content,
.page-content,
.site-content,
#primary,
#main,
.content-area,
.wp-site-blocks > *,
.entry-content > *:first-child,
.wp-block-group {
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
}

/* Ajustar espacio superior del contenedor principal */
.bait-verification-codes {
    max-width: 1200px;
    width: 100%;
    margin: 100px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Ajustar espacio del título */
.main-title {
    text-align: center;
    font-size: 32px;
    color: #333;
    margin: 0 0 30px 0;
    padding-top: 0;
    width: 100%;
    display: block;
    font-weight: bold;
}

.codes-grid {
    text-align: center;
    width: 100%;
}

.latest-code {
    margin-bottom: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.latest-code h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

.code-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 600px;
}

.code-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.code-item.latest {
    border: 5px solid #2196f3;
    padding: 30px;
    margin: 0 auto;
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.2);
}

.code-item .code {
    font-size: 32px;
    color: #2196f3;
    margin-bottom: 15px;
    font-weight: 500;
}

.code-item.latest .code {
    font-size: 42px;
}

.code-item .details {
    text-align: center;
}

.code-item .details p {
    margin: 5px 0;
    color: #666;
}

.code-item .details .date {
    font-size: 16px;
}

.code-item .details .time {
    font-size: 15px;
    color: #888;
}

.previous-codes {
    margin-top: 40px;
    width: 100%;
}

.previous-codes h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    font-weight: normal;
}

.codes-grid-previous {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.codes-grid-previous .code-item {
    border: 1px solid #333;
    width: auto;
    max-width: none;
}

.sync-container {
    margin: 20px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#sync-codes {
    background: #2196f3;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

#sync-codes:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

#sync-codes:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#sync-codes .dashicons {
    margin-right: 8px;
    font-size: 20px;
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

#sync-result {
    margin-top: 10px;
    text-align: center;
}

.sync-wait-message {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
    text-align: center;
    font-style: italic;
}

/* Responsive para tablets */
@media (max-width: 992px) {
    .codes-grid-previous {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive para móviles */
@media (max-width: 576px) {
    .codes-grid-previous {
        grid-template-columns: 1fr;
    }

    .main-title {
        font-size: 28px;
    }

    .code-item.latest .code {
        font-size: 36px;
    }
}

.no-codes {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 20px auto;
    max-width: 400px;
}

.no-codes p {
    margin: 10px 0;
    color: #666;
}

/* Estilos para los mensajes de estado */
.syncing, .success, .error {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 6px;
    margin: 10px 0;
    font-weight: normal;
}

.syncing {
    background: #e3f2fd;
    color: #1976d2;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.error {
    background: #ffebee;
    color: #c62828;
}
