/**
 * WhatsApp Floating Button PRO - Admin Styles
 */

/* General Admin Styles */
.wfb-admin-wrap {
    max-width: 1200px;
}

/* Tabs */
.wfb-tabs {
    margin: 20px 0;
    border-bottom: 2px solid #ddd;
    display: flex;
    gap: 5px;
}

.wfb-tab-button {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    color: #666;
}

.wfb-tab-button:hover {
    background: #f5f5f5;
    color: #000;
}

.wfb-tab-button.active {
    border-bottom-color: #25D366;
    color: #25D366;
    font-weight: 600;
    background: #f0fdf4;
}

.wfb-tab-content {
    display: none;
    padding: 20px 0;
    animation: fadeIn 0.3s ease;
}

.wfb-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toggle Switch */
.wfb-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    vertical-align: middle;
}

.wfb-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wfb-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.wfb-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .wfb-slider {
    background-color: #25D366;
}

input:focus + .wfb-slider {
    box-shadow: 0 0 1px #25D366;
}

input:checked + .wfb-slider:before {
    transform: translateX(26px);
}

/* Schedule Settings */
.wfb-schedule-day {
    padding: 15px;
    margin: 10px 0;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.wfb-schedule-day label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wfb-schedule-day input[type="time"] {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Preview Section */
.wfb-preview-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e9e9e9 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wfb-preview-section h2 {
    margin-top: 0;
    color: #333;
}

.wfb-preview-container {
    position: relative;
    height: 250px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-image: 
        linear-gradient(45deg, #f5f5f5 25%, transparent 25%),
        linear-gradient(-45deg, #f5f5f5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f5f5f5 75%),
        linear-gradient(-45deg, transparent 75%, #f5f5f5 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#wfb-preview-button {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s ease;
}

#wfb-preview-button:hover {
    transform: scale(1.1);
}

/* Statistics Page */
.wfb-stats-filters {
    margin: 20px 0;
}

.wfb-stats-filters .button {
    margin-right: 5px;
}

.wfb-stats-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.wfb-stat-box {
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #25D366;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wfb-stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wfb-stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wfb-stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #25D366;
    line-height: 1;
}

.wfb-chart-container {
    background: #fff;
    padding: 25px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wfb-chart-container h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #25D366;
    padding-bottom: 10px;
}

.wfb-table-container {
    background: #fff;
    padding: 25px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wfb-table-container h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #25D366;
    padding-bottom: 10px;
}

/* Multiple Numbers Page */
.wfb-add-number-form {
    margin-top: 30px;
    padding: 25px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.wfb-add-number-form h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #25D366;
    padding-bottom: 10px;
}

#sortable-numbers .handle {
    cursor: move;
    font-size: 18px;
    color: #999;
    user-select: none;
}

#sortable-numbers tr:hover .handle {
    color: #25D366;
}

.ui-sortable-helper {
    background: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .wfb-tabs {
        flex-wrap: wrap;
    }
    
    .wfb-tab-button {
        flex: 1 1 auto;
        min-width: 100px;
    }
    
    .wfb-schedule-day {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wfb-stats-boxes {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wfb-admin-wrap .notice {
    animation: slideInRight 0.3s ease;
}

/* Form Table Improvements */
.form-table th {
    font-weight: 600;
    color: #333;
}

.form-table input[type="range"] {
    width: 200px;
    vertical-align: middle;
}

.form-table #size-value {
    display: inline-block;
    margin-left: 10px;
    font-weight: 600;
    color: #25D366;
    min-width: 50px;
}

/* Submit Button */
.wfb-admin-wrap .button-primary {
    background: #25D366;
    border-color: #128C7E;
    text-shadow: none;
    box-shadow: none;
}

.wfb-admin-wrap .button-primary:hover {
    background: #128C7E;
    border-color: #0a5f54;
}

/* Success/Error Messages */
.wfb-admin-wrap .updated,
.wfb-admin-wrap .error {
    border-left-width: 4px;
}

.wfb-admin-wrap .updated {
    border-left-color: #25D366;
}

/* Help Text */
.description {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* Code Blocks */
code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: #d63638;
}
