/**
 * WhatsApp Rotator Overview Page Styling
 * Matches the design of the setup wizard with WhatsApp brand colors
 */
.overview-header .notice.notice-warning.is-dismissible {
    color: red;
}

.wh-csrotator-overview {
    max-width: 1200px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header styling */
.wh-csrotator-overview .overview-header {
    text-align: center;
    padding: 40px 30px;
    background: -webkit-linear-gradient(315deg, #25D366 0%, #128C7E 100%);
    background: -moz-linear-gradient(315deg, #25D366 0%, #128C7E 100%);
    background: -o-linear-gradient(315deg, #25D366 0%, #128C7E 100%);
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    position: relative;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    border-radius: 12px;
    -webkit-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.wh-csrotator-overview .overview-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wh-csrotator-overview .overview-header img {
    max-width: 150px;
    margin-bottom: 20px;
    -webkit-filter: brightness(0) invert(1);
    filter: brightness(0) invert(1);
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: -webkit-transform 0.3s ease;
    -o-transition: -o-transform 0.3s ease;
    -moz-transition: transform 0.3s ease, -moz-transform 0.3s ease;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease, -moz-transform 0.3s ease, -o-transform 0.3s ease;
}

.wh-csrotator-overview .overview-header img:hover {
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    -ms-transform: scale(1.05);
    -o-transform: scale(1.05);
    transform: scale(1.05);
}

/* Navigation buttons */
.wh-csrotator-overview .nav-buttons {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.wh-csrotator-overview .nav-buttons a.button {
    background-color: #f9f9f9;
    color: #333;
    border: 1px solid #ddd;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 5px;
}

.wh-csrotator-overview .nav-buttons a.button:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.wh-csrotator-overview .nav-buttons a.button-primary {
    background-color: #25D366;
    color: white;
    border-color: #25D366;
}

.wh-csrotator-overview .nav-buttons a.button-primary:hover {
    background-color: #128C7E;
    border-color: #128C7E;
}

/* Overview cards */
.wh-csrotator-overview .overview-cards {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wh-csrotator-overview .card {
    background: white;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    -webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    -moz-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-transition: -webkit-transform 0.3s ease, -webkit-box-shadow 0.3s ease;
    transition: -webkit-transform 0.3s ease, -webkit-box-shadow 0.3s ease;
    -o-transition: box-shadow 0.3s ease, -o-transform 0.3s ease;
    -moz-transition: transform 0.3s ease, box-shadow 0.3s ease, -moz-transform 0.3s ease, -moz-box-shadow 0.3s ease;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transition: transform 0.3s ease, box-shadow 0.3s ease, -webkit-transform 0.3s ease, -moz-transform 0.3s ease, -o-transform 0.3s ease, -webkit-box-shadow 0.3s ease, -moz-box-shadow 0.3s ease;
}

.wh-csrotator-overview .card:hover {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    transform: translateY(-5px);
    -webkit-box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    -moz-box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.wh-csrotator-overview .card-icon {
    width: 60px;
    height: 60px;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    background: -webkit-linear-gradient(315deg, #25D366 0%, #128C7E 100%);
    background: -moz-linear-gradient(315deg, #25D366 0%, #128C7E 100%);
    background: -o-linear-gradient(315deg, #25D366 0%, #128C7E 100%);
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-right: 20px;
}

.wh-csrotator-overview .card-icon .dashicons {
    color: white;
    font-size: 30px;
    width: 30px;
    height: 30px;
}

/* Styles for Today's Leads by Staff Chart */
.todays-leads-chart-container {    
    max-height: 350px;  
    margin: 30px auto;  
    padding: 20px;
    border: 1px solid #ccd0d4; 
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,.04); 
}

#todaysLeadsByStaffChart {
    display: block; 
    box-sizing: border-box; 
    width: 100% !important;
    height: 250px !important; 
    max-width: 100%; 
}

.wh-csrotator-overview .card-content h3 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #333;
}

.wh-csrotator-overview .card-count {
    font-size: 28px;
    font-weight: 700;
    color: #128C7E;
}

/* Performance analysis section */
.wh-csrotator-overview .performance-analysis {
    background: white;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    -webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    -moz-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 30px;
}

.wh-csrotator-overview .performance-analysis h2 {
    margin-top: 0;
    color: #128C7E;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.wh-csrotator-overview .analysis-form .form-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.wh-csrotator-overview .analysis-form .form-group {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 200px;
}

.wh-csrotator-overview .analysis-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.wh-csrotator-overview .analysis-form select,
.wh-csrotator-overview .analysis-form input[type="date"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.wh-csrotator-overview .analysis-form button {
    background-color: #25D366;
    color: white;
    border: none;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    -webkit-transition: background-color 0.3s ease;
    -o-transition: background-color 0.3s ease;
    -moz-transition: background-color 0.3s ease;
    transition: background-color 0.3s ease;
}

.wh-csrotator-overview .analysis-form button:hover {
    background-color: #128C7E;
}

/* Results section */
.wh-csrotator-overview .results-section {
    background: white;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    -webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    -moz-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
}

.wh-csrotator-overview .results-section h2 {
    margin-top: 0;
    color: #128C7E;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.wh-csrotator-overview .results-table {
    width: 100%;
    border-collapse: collapse;
}

.wh-csrotator-overview .results-table th {
    background-color: #f9f9f9;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #eee;
}

.wh-csrotator-overview .results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.wh-csrotator-overview .results-table tr:hover {
    background-color: #f9f9f9;
}

/* Overview */
.wh-csrotator-overview {
    padding: 20px;
}

.nav-buttons {
    margin: 20px 0;
}

.nav-buttons .button {
    margin-right: 10px;
}

.nav-buttons .button .dashicons {
    margin: 4px 5px 0 -2px;
}

.overview-cards {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.overview-cards .card {
    background: #fff;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    padding: 24px;
    -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-transition: -webkit-transform 0.2s ease, -webkit-box-shadow 0.2s ease;
    transition: -webkit-transform 0.2s ease, -webkit-box-shadow 0.2s ease;
    -o-transition: box-shadow 0.2s ease, -o-transform 0.2s ease;
    -moz-transition: transform 0.2s ease, box-shadow 0.2s ease, -moz-transform 0.2s ease, -moz-box-shadow 0.2s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease, -webkit-transform 0.2s ease, -moz-transform 0.2s ease, -o-transform 0.2s ease, -webkit-box-shadow 0.2s ease, -moz-box-shadow 0.2s ease;
}

.overview-cards .card:hover {
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    -o-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.overview-cards .card-icon {
    margin-right: 20px;
}


.overview-cards .card-content {
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
    -moz-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
}

.overview-cards .card-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1d2327;
}

.overview-cards .card-count {
    font-size: 28px;
    font-weight: 600;
    color: #2271b1;
}

.performance-analysis {
    margin-top: 40px;
    background: #fff;
    padding: 24px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.performance-analysis h2 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.analysis-form .form-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    gap: 24px;
    -webkit-box-align: end;
    -webkit-align-items: flex-end;
    -moz-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 4px 0;
}

.form-group {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #1d2327;
}

.form-group select {
    width: 100%;
    max-width: 100%;
    height: 40px;
    padding: 8px 12px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    border: 1px solid #8c8f94;
}

.form-group select:focus {
    border-color: #2271b1;
    -webkit-box-shadow: 0 0 0 1px #2271b1;
    -moz-box-shadow: 0 0 0 1px #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

.form-group button.button-primary {
    height: 40px;
    padding: 0 20px;
    line-height: 38px;
    width: 100%;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.form-group button.button-primary .dashicons {
    margin-right: 8px;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.result-cards {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.result-card {
    background: #f0f6fc;
    padding: 20px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
    text-align: center;
}

.result-card h4 {
    margin: 0 0 10px 0;
    color: #1d2327;
}

.result-card .result-count {
    font-size: 24px;
    font-weight: 600;
    color: #2271b1;
    margin-bottom: 5px;
}

.result-card .result-label {
    color: #646970;
    font-size: 13px;
}


.button.has-icon {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 5px;
}

@media screen and (max-width: 782px) {
    .overview-cards {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }

    .overview-cards .card {
        padding: 16px;
    }

    .overview-cards .card-icon .dashicons {
        width: 36px;
        height: 36px;
        font-size: 36px;
    }

    .overview-cards .card-count {
        font-size: 24px;
    }

    .form-group {
        -webkit-box-flex: 1;
        -webkit-flex: 1 1 100%;
        -moz-box-flex: 1;
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
    }

    .result-cards {
        -ms-grid-columns: 1fr 1fr;
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 480px) {
    .result-cards {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wh-csrotator-overview .overview-cards {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }

    .wh-csrotator-overview .nav-buttons {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: center;
        -webkit-align-items: center;
        -moz-box-align: center;
        -ms-flex-align: center;
        align-items: center;
    }

    .wh-csrotator-overview .nav-buttons a.button {
        width: 100%;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -moz-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
}