/* EncontrePortugal Auto Publisher — Admin CSS */

.ep-wrap { max-width: 1100px; }

/* Header */
.ep-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.ep-header-left { display: flex; align-items: center; gap: 14px; }
.ep-flag { font-size: 36px; line-height: 1; }
.ep-header h1 { margin: 0; font-size: 22px; font-weight: 700; }
.ep-subtitle { margin: 2px 0 0; color: #666; font-size: 13px; }

/* Badges de estado */
.ep-badge-on  { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; border-radius: 20px; padding: 4px 14px; font-size: 13px; font-weight: 600; }
.ep-badge-off { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; border-radius: 20px; padding: 4px 14px; font-size: 13px; font-weight: 600; }

/* Alert */
.ep-alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.ep-alert-warn { background: #fff8e1; border: 1px solid #ffe082; color: #e65100; }

/* Notice */
.ep-notice { padding: 10px 14px; border-radius: 5px; font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.ep-notice-success { background: #e8f5e9; border-color: #a5d6a7; color: #1b5e20; }
.ep-notice-error   { background: #ffebee; border-color: #ef9a9a; color: #b71c1c; }
.ep-notice-info    { background: #f0f7ff; border-color: #c5d5f5; color: #1a237e; }

/* Stats grid */
.ep-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.ep-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.ep-stat-num   { font-size: 32px; font-weight: 700; color: #1a73e8; }
.ep-stat-label { font-size: 12px; color: #666; margin-top: 4px; }

/* Panel */
.ep-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    overflow: hidden;
}
.ep-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.ep-panel-title { font-size: 14px; font-weight: 700; color: #333; }
.ep-panel-body  { padding: 16px 18px; }

/* Slots grid */
.ep-slots-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.ep-slot-card {
    background: #f8f9ff;
    border: 1px solid #e0e4ff;
    border-radius: 8px;
    padding: 12px 20px;
    text-align: center;
    min-width: 120px;
}
.ep-slot-num  { font-size: 11px; color: #888; font-weight: 600; text-transform: uppercase; }
.ep-slot-time { font-size: 22px; font-weight: 700; color: #1a73e8; margin: 4px 0; }
.ep-slot-next { font-size: 11px; color: #555; }

/* Table */
.ep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ep-table th { background: #f5f5f5; padding: 8px 12px; text-align: left; font-weight: 600; color: #444; border-bottom: 2px solid #e0e0e0; }
.ep-table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.ep-table tr:last-child td { border-bottom: none; }
.ep-table tr:hover td { background: #fafafa; }

/* Pool status badges */
.ep-badge-pending { background: #fff8e1; color: #e65100; border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.ep-badge-done    { background: #e8f5e9; color: #2e7d32; border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.ep-badge-src     { background: #e3f2fd; color: #1565c0; border-radius: 10px; padding: 1px 8px; font-size: 11px; }

/* Spinner */
.ep-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid #ddd;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: ep-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes ep-spin { to { transform: rotate(360deg); } }

/* Result box */
.ep-result-box {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid;
}
.ep-result-success { background: #e8f5e9; border-color: #a5d6a7; color: #1b5e20; }
.ep-result-error   { background: #ffebee; border-color: #ef9a9a; color: #b71c1c; }
.ep-result-skip    { background: #fff8e1; border-color: #ffe082; color: #e65100; }

@media (max-width: 768px) {
    .ep-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Imagens inline nos artigos (frontend) ── */
.ep-figure {
    margin: 24px 0;
    max-width: 100%;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.ep-figure img {
    width: 100%;
    height: auto;
    display: block;
}
.ep-figure figcaption {
    font-size: 12px;
    color: #888;
    padding: 6px 10px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}
.ep-figure figcaption a { color: #1a73e8; text-decoration: none; }
.ep-figure figcaption a:hover { text-decoration: underline; }

@media (min-width: 900px) {
    .ep-figure.ep-img-left  { float: left;  margin: 8px 28px 16px 0; max-width: 48%; }
    .ep-figure.ep-img-right { float: right; margin: 8px 0 16px 28px; max-width: 48%; }
    .ep-figure.ep-img-left + *,
    .ep-figure.ep-img-right + * { overflow: hidden; }
}
