/**
 * WEBFUL Analytics - Styles Admin
 * Version: 1.0.0
 */

/* Container principal */
.webful-admin {
    margin: 20px 20px 0 0;
}

.webful-container {
    max-width: 1200px;
}

/* Grille */
.webful-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 782px) {
    .webful-grid {
        grid-template-columns: 1fr;
    }
}

/* Cartes */
.webful-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.webful-card-full {
    grid-column: 1 / -1;
}

.webful-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #c3c4c7;
    background: #f6f7f7;
}

.webful-card-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.webful-card-body {
    padding: 20px;
}

/* Formulaires */
.webful-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.form-group .description {
    margin-top: 8px;
    color: #646970;
    font-size: 13px;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.button .dashicons {
    margin-top: 3px;
    margin-right: 5px;
}

/* Messages */
.webful-message {
    padding: 12px 16px;
    margin: 20px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.webful-message.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.webful-message.error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.webful-message.info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Notices */
.webful-notice {
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.webful-notice p {
    margin: 0.5em 0;
}

.webful-notice-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.webful-notice-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.webful-notice-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

/* Statut */
.webful-status {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 20px;
}

.webful-status .dashicons {
    margin-right: 8px;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.webful-status-connected {
    background: #d4edda;
    color: #28a745;
}

.webful-status-disconnected {
    background: #f8d7da;
    color: #dc3545;
}

/* Tableau d'informations */
.webful-info-table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.webful-info-table tr {
    border-bottom: 1px solid #f0f0f1;
}

.webful-info-table tr:last-child {
    border-bottom: none;
}

.webful-info-table td {
    padding: 12px 0;
}

.webful-info-table td:first-child {
    width: 120px;
    color: #646970;
}

.webful-info-table code {
    background: #f0f0f1;
    padding: 3px 8px;
    border-radius: 3px;
    font-family: Monaco, Consolas, monospace;
    font-size: 12px;
}

/* Quota */
.webful-quota {
    margin: 20px 0;
}

.webful-quota-bar {
    margin-bottom: 20px;
}

.webful-quota-progress {
    width: 100%;
    height: 30px;
    background: #f0f0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.webful-quota-fill {
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.webful-quota-success {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.webful-quota-warning {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.webful-quota-danger {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

.webful-quota-text {
    color: #646970;
    font-size: 14px;
}

/* Aide */
.webful-help {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f1;
}

.webful-help p {
    color: #646970;
    margin: 10px 0;
}

.webful-help a {
    color: #2271b1;
    text-decoration: none;
}

.webful-help a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Loading */
.webful-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: webful-spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes webful-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .webful-admin {
        margin: 10px 10px 0 0;
    }

    .webful-card-body {
        padding: 15px;
    }

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

    .form-actions .button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Styles pour le badge WEBFUL */
.webful-disabled-setting {
    opacity: 0.6;
    cursor: not-allowed;
}

.webful-disabled-setting input[type="checkbox"] {
    cursor: not-allowed;
}

.webful-premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
}

.webful-upgrade-link {
    color: #764ba2;
    font-weight: 600;
    text-decoration: underline;
}

.webful-upgrade-link:hover {
    color: #667eea;
}
