/* ============================================
   DTIC Cache - Estilos Administrativos e Widget
   ============================================ */

.dtic-cache-admin {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.dtic-cache-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dtic-cache-header h2 {
    margin-top: 0;
    color: white;
}

.dtic-cache-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
}

.dtic-cache-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.dtic-cache-form .form-table {
    margin-bottom: 20px;
}

.dtic-cache-form .form-table th {
    width: 200px;
}

.dtic-cache-form .form-table input[type="text"],
.dtic-cache-form .form-table input[type="number"] {
    width: 100%;
    max-width: 500px;
}

.dtic-toggle-field {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 8px;
}

.dtic-cache-clear-section {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.dtic-cache-clear-section h2 {
    color: #856404;
    margin-top: 0;
}

.dtic-cache-clear-section p {
    color: #856404;
    margin: 10px 0;
}

.dtic-clear-cache-btn {
    background: #dc3545;
    border-color: #c82333;
    color: white;
}

.dtic-clear-cache-btn:hover {
    background: #c82333;
    border-color: #bd2130;
    color: white;
}

.dtic-clear-cache-btn .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

.dtic-cache-info {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
}

.dtic-cache-info h3 {
    color: #2e7d32;
    margin-top: 0;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list strong {
    color: #1b5e20;
}

.info-list code {
    background: #f1f8e9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.cache-size {
    font-weight: bold;
    color: #2196f3;
}

.cache-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9em;
}

.cache-status.active {
    background: #4caf50;
    color: white;
}

.cache-status.inactive {
    background: #f44336;
    color: white;
}

/* ============================================
   Estilos do Widget
   ============================================ */

.dtic-cache-widget-box {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dtic-cache-widget-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.cache-widget-status,
.cache-widget-size {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cache-widget-status .label,
.cache-widget-size .label {
    font-weight: 600;
    color: #666;
    margin-right: 10px;
}

.cache-widget-status .status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.cache-widget-status .status.ativo {
    background-color: #d4edda;
    color: #155724;
}

.cache-widget-status .status.inativo {
    background-color: #f8d7da;
    color: #721c24;
}

.cache-widget-size .size {
    font-weight: 600;
    color: #007bff;
    font-size: 16px;
}

.cache-widget-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 8px;
}

.cache-widget-actions .button {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 8px 12px;
}

.cache-widget-actions .button.button-small {
    display: inline-block;
    flex: auto;
}

/* Responsivo */
@media (max-width: 768px) {
    .dtic-cache-admin {
        margin: 0 -20px;
    }

    .dtic-cache-header {
        margin: 0 -20px 20px -20px;
        border-radius: 0;
    }

    .dtic-cache-form .form-table th {
        width: auto;
        display: block;
        margin-bottom: 10px;
    }

    .dtic-cache-form .form-table input[type="text"],
    .dtic-cache-form .form-table input[type="number"] {
        max-width: 100%;
    }

    .dtic-cache-clear-section,
    .dtic-cache-info {
        margin-left: -20px;
        margin-right: -20px;
    }

    .cache-widget-status,
    .cache-widget-size {
        flex-direction: column;
        align-items: flex-start;
    }

    .cache-widget-actions {
        flex-direction: column;
    }

    .cache-widget-actions .button {
        flex: 1;
    }
}

/* Animações */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dtic-cache-form,
.dtic-cache-clear-section,
.dtic-cache-info,
.dtic-cache-widget-box {
    animation: slideIn 0.3s ease-out;
}

