/**
 * Frontend Dashboard CSS - Wizard Donazione Campagna
 * Stile identico alla dashboard admin ma per frontend
 * 
 * File: assets/frontend-dashboard.css
 * @version 1.0.0
 */

/* RESET & BASE */
.wdc-frontend-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1d2327;
    line-height: 1.6;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.wdc-frontend-dashboard * {
    box-sizing: border-box;
}

/* HEADER */
.wdc-frontend-header {
    background: linear-gradient(135deg, #6e286b, #a0b325);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    color: white;
}

.wdc-frontend-header h1,
.wdc-frontend-dashboard .wdc-frontend-header h1 {
    margin: 0 0 8px 0 !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    color: white !important;
    line-height: 1.2 !important;
    text-shadow: none !important;
}

.wdc-welcome {
    color: white !important;
    font-size: 16px !important;
    margin: 0 !important;
    font-weight: 400 !important;
}

/* TABS NAVIGATION */
.wdc-frontend-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.wdc-tab-btn {
    padding: 12px 24px;
    text-decoration: none;
    color: #646970;
    font-weight: 600;
    background: transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
    font-size: 14px;
}

.wdc-tab-btn:hover {
    background: #f0f0f1;
    color: #1d2327;
}

.wdc-tab-active {
    background: #6e286b;
    color: white;
}

.wdc-tab-active:hover {
    background: #5a2156;
    color: white;
}

/* TAB CONTENT */
.wdc-tab-content {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* BUTTONS */
.button,
.wdc-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    color: #2c3338;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button:hover,
.wdc-btn:hover {
    background: #e9ecef;
    border-color: #8c8f94;
}

.button-primary {
    background: #a0b325;
    border-color: #a0b325;
    color: #fff;
}

.button-primary:hover {
    background: #8a9d1f;
    border-color: #8a9d1f;
}

.button-small {
    padding: 4px 10px;
    font-size: 12px;
}

/* TABLES */
.wp-list-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
}

.wp-list-table thead th {
    background: #f6f7f7;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #c3c4c7;
    font-size: 13px;
    color: #1d2327;
}

.wp-list-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f1;
}

.wp-list-table tbody tr:hover {
    background: #f6f7f7;
}

.widefat {
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.striped tbody tr:nth-child(odd) {
    background: #f9f9f9;
}

/* NOTICE */
.notice {
    background: #fff;
    border-left: 4px solid #72aee6;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.notice-info {
    border-left-color: #72aee6;
}

.notice-success {
    border-left-color: #00a32a;
}

.notice-warning {
    border-left-color: #dba617;
}

.notice-error {
    border-left-color: #d63638;
}

.notice p {
    margin: 0.5em 0;
}

/* FORMS */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #a0b325;
    box-shadow: 0 0 0 1px #a0b325;
}

/* MODAL (riusa stili admin) */
.wdc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none;
}

.wdc-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.wdc-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
}

.wdc-modal-header {
    background: #f6f7f7;
    padding: 20px;
    border-bottom: 1px solid #dcdcde;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wdc-modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.wdc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #646970;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.wdc-modal-close:hover {
    background: #dcdcde;
}

.wdc-modal-body {
    padding: 20px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* STATS (riusa stili admin) */
.wdc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.wdc-stat-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.wdc-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wdc-stat-icon {
    font-size: 40px;
    line-height: 1;
}

.wdc-stat-content {
    flex: 1;
}

.wdc-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
}

.wdc-stat-label {
    font-size: 14px;
    color: #646970;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wdc-stat-meta {
    font-size: 12px;
    color: #8c8f94;
    margin-top: 5px;
}

/* Card Colors */
.wdc-card-primary { border-left: 4px solid #a0b325; }
.wdc-card-primary .wdc-stat-value { color: #a0b325; }

.wdc-card-warning { border-left: 4px solid #ffc107; }
.wdc-card-warning .wdc-stat-value { color: #ffc107; }

.wdc-card-info { border-left: 4px solid #2271b1; }
.wdc-card-info .wdc-stat-value { color: #2271b1; }

.wdc-card-success { border-left: 4px solid #28a745; }
.wdc-card-success .wdc-stat-value { color: #28a745; }

.wdc-card-secondary { border-left: 4px solid #6c757d; }
.wdc-card-secondary .wdc-stat-value { color: #6c757d; }

.wdc-card-default { border-left: 4px solid #8c8f94; }
.wdc-card-default .wdc-stat-value { color: #3c434a; }

/* PAGINATION */
.tablenav {
    padding: 15px 0;
}

.tablenav-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.displaying-num {
    color: #646970;
    font-size: 13px;
}

.pagination-links a {
    padding: 5px 10px;
    border: 1px solid #c3c4c7;
    background: #f6f7f7;
    text-decoration: none;
    border-radius: 4px;
    color: #2c3338;
}

.pagination-links a:hover {
    background: #e9ecef;
}

/* RESPONSIVE */
@media (max-width: 782px) {
    .wdc-frontend-dashboard {
        padding: 0;
    }

    .wdc-frontend-header {
        padding: 30px 20px;
        margin: 0 0 20px 0;
    }

    .wdc-frontend-header h1 {
        font-size: 24px;
    }

    .wdc-frontend-tabs {
        padding: 0 20px;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wdc-tab-btn {
        flex-shrink: 0;
    }

    .wdc-tab-content {
        padding: 15px;
        margin: 0 10px;
    }

    .wdc-stats-grid {
        grid-template-columns: 1fr;
    }
}
