/**
 * Ze Voice - Frontend Styles
 *
 * @package Ze_Voice
 */

/* Survey Wrapper - ISOLATED with !important to prevent theme conflicts */
.zevoice-survey-wrapper {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px 20px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-sizing: border-box !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Custom background image - overrides default gradient */
.zevoice-survey-wrapper.has-custom-background {
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-attachment: fixed !important;
    background-size: cover !important;
}

.zevoice-survey-content {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    padding: 40px !important;
    max-width: 700px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
}

.zevoice-club-header {
    text-align: center !important;
    margin-bottom: 0 !important;
    padding: 25px 20px !important;
    background-color: #ffffff !important;
    border-radius: 12px 12px 0 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.zevoice-club-logo {
    max-width: 200px !important;
    max-height: 80px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* When header has logo, adjust content box */
.zevoice-survey-content:has(.zevoice-club-header) {
    border-radius: 12px !important;
    overflow: hidden !important;
}

.zevoice-survey-content .zevoice-club-header + .wpforms-container {
    padding-top: 20px !important;
}

/* Error Messages */
.zevoice-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 15px 20px;
    border-radius: 6px;
    text-align: center;
}

/* Client Dashboard */
.zevoice-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.zevoice-dashboard-header {
    margin-bottom: 30px;
}

.zevoice-dashboard-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

/* Dashboard Navigation */
.zevoice-dashboard-nav {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
    gap: 5px;
}

.zevoice-dashboard-nav a {
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.zevoice-dashboard-nav a:hover {
    color: #333;
}

.zevoice-dashboard-nav a.active {
    color: var(--zevoice-primary, #3498db);
    border-bottom-color: var(--zevoice-primary, #3498db);
}

/* Overview Stats */
.zevoice-overview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.zevoice-stat-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.zevoice-stat-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

.zevoice-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    display: block;
}

.zevoice-stat-label {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
    display: block;
}

/* NPS Breakdown */
.zevoice-nps-breakdown {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.zevoice-nps-breakdown h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.zevoice-nps-bar {
    display: flex;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.zevoice-bar-promoters {
    background: #27ae60;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    padding: 0 5px;
    min-width: fit-content;
}

.zevoice-bar-passives {
    background: #f39c12;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    padding: 0 5px;
    min-width: fit-content;
}

.zevoice-bar-detractors {
    background: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    padding: 0 5px;
    min-width: fit-content;
}

/* Survey Link Box */
.zevoice-survey-link {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 25px;
}

.zevoice-survey-link h3 {
    margin: 0 0 15px;
    font-size: 18px;
}

.zevoice-url-box {
    display: flex;
    gap: 10px;
}

.zevoice-url-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
}

.zevoice-copy-btn {
    padding: 12px 20px;
    background: var(--zevoice-primary, #3498db);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.zevoice-copy-btn:hover {
    background: #2980b9;
}

.zevoice-help-text {
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}

/* Settings Form */
.zevoice-settings-form {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 30px;
}

.zevoice-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.zevoice-form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.zevoice-form-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.zevoice-form-row {
    margin-bottom: 20px;
}

.zevoice-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.zevoice-form-row input[type="text"],
.zevoice-form-row input[type="email"],
.zevoice-form-row textarea,
.zevoice-form-row select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.zevoice-form-row input:focus,
.zevoice-form-row textarea:focus,
.zevoice-form-row select:focus {
    outline: none;
    border-color: var(--zevoice-primary, #3498db);
}

.zevoice-form-row .description {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
}

.zevoice-form-row.zevoice-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Image Upload */
.zevoice-image-upload {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.zevoice-image-upload .zevoice-image-preview {
    width: 100px;
    height: 100px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
}

.zevoice-image-upload .zevoice-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.zevoice-upload-btn,
.zevoice-remove-btn {
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.zevoice-upload-btn:hover {
    background: #f0f0f0;
}

.zevoice-remove-btn {
    color: #c00;
    border-color: #fcc;
}

.zevoice-remove-btn:hover {
    background: #fee;
}

/* Submit Button */
.zevoice-submit-btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--zevoice-primary, #3498db);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.zevoice-submit-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* Email Generator */
.zevoice-email-generator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.zevoice-email-preview-section,
.zevoice-email-output {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 25px;
}

.zevoice-email-preview-section h3,
.zevoice-email-output h3 {
    margin: 0 0 15px;
    font-size: 18px;
}

.zevoice-email-frame {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 20px;
    min-height: 400px;
    max-height: 500px;
    overflow: auto;
    border-radius: 6px;
}

.zevoice-email-actions {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px 0;
}

.zevoice-btn {
    display: inline-block;
    padding: 12px 25px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
}

.zevoice-btn:hover {
    background: #f0f0f0;
}

.zevoice-btn-primary {
    background: var(--zevoice-primary, #3498db);
    color: #fff;
    border-color: var(--zevoice-primary, #3498db);
}

.zevoice-btn-primary:hover {
    background: #2980b9;
    color: #fff;
}

.zevoice-email-output textarea {
    width: 100%;
    height: 300px;
    font-family: monospace;
    font-size: 12px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    resize: vertical;
}

/* Responses Table */
.zevoice-table {
    width: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.zevoice-table thead {
    background: #f8f9fa;
}

.zevoice-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
}

.zevoice-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.zevoice-table tbody tr:last-child td {
    border-bottom: none;
}

.zevoice-table tbody tr:hover {
    background: #fafafa;
}

/* Score Badge */
.zevoice-score {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.zevoice-score-promoter { background: #27ae60; }
.zevoice-score-passive { background: #f39c12; }
.zevoice-score-detractor { background: #e74c3c; }

/* View Response Button */
.zevoice-view-response {
    padding: 8px 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.zevoice-view-response:hover {
    background: #e0e0e0;
}

/* Pagination */
.zevoice-pagination {
    margin-top: 20px;
    text-align: center;
}

.zevoice-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}

.zevoice-pagination .page-numbers.current {
    background: var(--zevoice-primary, #3498db);
    color: #fff;
    border-color: var(--zevoice-primary, #3498db);
}

/* No Data */
.zevoice-no-data {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}

/* Response Details Modal */
.zevoice-response-details {
    padding: 20px;
}

.zevoice-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.zevoice-response-date {
    color: #888;
    font-size: 14px;
}

.zevoice-response-client,
.zevoice-response-params,
.zevoice-response-fields {
    margin-bottom: 20px;
}

.zevoice-response-fields dl {
    margin: 10px 0 0;
}

.zevoice-response-fields dt {
    font-weight: 600;
    margin-top: 10px;
    color: #555;
}

.zevoice-response-fields dd {
    margin: 5px 0 0 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

/* NPS Widget */
.zevoice-nps-widget {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #fff;
}

.zevoice-nps-score {
    font-size: 72px;
    font-weight: 800;
    display: block;
}

.zevoice-nps-label {
    font-size: 20px;
    font-weight: 600;
    opacity: 0.9;
}

.zevoice-nps-meta {
    font-size: 14px;
    margin-top: 10px;
    opacity: 0.8;
}

/* Club Selector */
.zevoice-club-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.zevoice-club-selector label {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.zevoice-club-selector select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
    min-width: 200px;
}

.zevoice-club-selector select:focus {
    outline: none;
    border-color: var(--zevoice-primary, #3498db);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Section Description */
.zevoice-section-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--zevoice-primary, #3498db);
}

/* Audit Calendar */
.zevoice-calendar-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 30px;
}

.zevoice-calendar-section h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #333;
}

.zevoice-audit-calendar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.zevoice-audit-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.zevoice-audit-card.hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.zevoice-audit-quarter {
    font-size: 28px;
    font-weight: 800;
    color: #495057;
    margin-bottom: 10px;
}

.zevoice-audit-date {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.zevoice-audit-status {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 500;
}

/* Audit Status Colors */
.zevoice-audit-scheduled {
    border-color: #3498db;
}

.zevoice-audit-scheduled .zevoice-audit-status {
    background: #e3f2fd;
    color: #1976d2;
}

.zevoice-audit-soon {
    border-color: #f39c12;
}

.zevoice-audit-soon .zevoice-audit-status {
    background: #fff3cd;
    color: #856404;
}

.zevoice-audit-imminent {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #fee 100%);
    animation: pulse-imminent 2s infinite;
}

.zevoice-audit-imminent .zevoice-audit-status {
    background: #e74c3c;
    color: #fff;
}

.zevoice-audit-passed {
    border-color: #ccc;
    opacity: 0.6;
}

.zevoice-audit-passed .zevoice-audit-status {
    background: #e9ecef;
    color: #6c757d;
}

@keyframes pulse-imminent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
}

/* Email Editor Section */
.zevoice-email-editor-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
}

.zevoice-email-editor-section h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #333;
}

.zevoice-email-editor-section .zevoice-form-row {
    margin-bottom: 20px;
}

.zevoice-email-editor-section .widefat {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.zevoice-email-editor-section textarea.widefat {
    min-height: 100px;
    resize: vertical;
}

.zevoice-protected-url {
    position: relative;
}

.zevoice-protected-url input {
    background: #f0f0f0 !important;
    color: #666;
    cursor: not-allowed;
    padding-right: 45px !important;
}

.zevoice-lock-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* Email Actions */
.zevoice-email-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px 0;
}

.zevoice-btn-secondary {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.zevoice-btn-secondary:hover {
    background: #5a6268;
    color: #fff;
}

/* Email Output */
.zevoice-email-output {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 30px;
}

.zevoice-email-output h3 {
    margin: 0 0 15px;
    font-size: 18px;
}

.zevoice-email-output textarea {
    width: 100%;
    height: 350px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 12px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    resize: vertical;
    background: #f8f9fa;
    line-height: 1.5;
}

/* Warning Message */
.zevoice-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .zevoice-overview-stats {
        grid-template-columns: 1fr;
    }

    .zevoice-dashboard-nav {
        flex-wrap: wrap;
    }

    .zevoice-dashboard-nav a {
        flex: 1;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }

    .zevoice-email-generator {
        grid-template-columns: 1fr;
    }

    .zevoice-form-row.zevoice-inline {
        grid-template-columns: 1fr;
    }

    .zevoice-url-box {
        flex-direction: column;
    }

    .zevoice-table {
        display: block;
        overflow-x: auto;
    }

    .zevoice-club-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .zevoice-club-selector select {
        min-width: 100%;
    }

    .zevoice-audit-calendar {
        grid-template-columns: repeat(2, 1fr);
    }

    .zevoice-email-actions {
        flex-direction: column;
    }

    .zevoice-email-actions .zevoice-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .zevoice-audit-calendar {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Modern Configuration Form Styles
   ISOLATED STYLES - All with !important to prevent theme conflicts
   ============================================ */

/* Base form reset */
.zevoice-dashboard .zevoice-settings-modern {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Configuration Cards */
.zevoice-dashboard .zevoice-config-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 24px !important;
    overflow: hidden !important;
    border: none !important;
}

.zevoice-dashboard .zevoice-config-card-header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 24px 28px 20px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.zevoice-dashboard .zevoice-config-icon {
    flex-shrink: 0 !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.zevoice-dashboard .zevoice-config-icon svg {
    width: 24px !important;
    height: 24px !important;
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.zevoice-dashboard .zevoice-config-card-title {
    flex: 1 !important;
}

.zevoice-dashboard .zevoice-config-card-title h3 {
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    background: none !important;
    border: none !important;
    line-height: 1.4 !important;
}

.zevoice-dashboard .zevoice-config-card-title p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    background: none !important;
}

.zevoice-dashboard .zevoice-config-card-body {
    padding: 24px 28px !important;
    background: #ffffff !important;
}

/* Form Groups */
.zevoice-dashboard .zevoice-form-group {
    margin-bottom: 20px !important;
}

.zevoice-dashboard .zevoice-form-group:last-child {
    margin-bottom: 0 !important;
}

.zevoice-dashboard .zevoice-form-group > label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
    background: none !important;
    padding: 0 !important;
}

/* Input fields - CRITICAL: force white background and dark text */
.zevoice-dashboard .zevoice-form-group input[type="text"],
.zevoice-dashboard .zevoice-form-group input[type="email"],
.zevoice-dashboard .zevoice-form-group input[type="password"],
.zevoice-dashboard .zevoice-form-group input[type="number"],
.zevoice-dashboard .zevoice-form-group input[type="url"],
.zevoice-dashboard .zevoice-form-group input[type="tel"],
.zevoice-dashboard .zevoice-settings-modern input[type="text"],
.zevoice-dashboard .zevoice-settings-modern input[type="email"],
.zevoice-dashboard #manager_name,
.zevoice-dashboard #crm_type {
    width: 100% !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #1e293b !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.zevoice-dashboard .zevoice-form-group input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.zevoice-dashboard .zevoice-form-group input:focus,
.zevoice-dashboard .zevoice-settings-modern input:focus,
.zevoice-dashboard #manager_name:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12) !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
}

/* Select fields */
.zevoice-dashboard .zevoice-form-group select,
.zevoice-dashboard .zevoice-settings-modern select,
.zevoice-dashboard #crm_type {
    width: 100% !important;
    padding: 14px 48px 14px 16px !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 20px !important;
    color: #1e293b !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
}

.zevoice-dashboard .zevoice-form-group select:focus,
.zevoice-dashboard #crm_type:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12) !important;
    background-color: #ffffff !important;
}

.zevoice-dashboard .zevoice-form-group select option {
    background-color: #ffffff !important;
    color: #1e293b !important;
    padding: 10px !important;
}

/* Textarea */
.zevoice-dashboard .zevoice-form-group textarea,
.zevoice-dashboard .zevoice-settings-modern textarea {
    width: 100% !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    resize: vertical !important;
    min-height: 100px !important;
}

.zevoice-dashboard .zevoice-form-group textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12) !important;
}

/* Form hint text */
.zevoice-dashboard .zevoice-form-hint,
.zevoice-dashboard span.zevoice-form-hint {
    display: block !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #64748b !important;
    margin-top: 8px !important;
    line-height: 1.5 !important;
    background: none !important;
}

/* Autre CRM Notice */
.zevoice-dashboard .zevoice-autre-crm-notice {
    display: flex !important;
    gap: 16px !important;
    padding: 20px !important;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border: 1px solid #f59e0b !important;
    border-radius: 12px !important;
    margin-top: 16px !important;
}

.zevoice-dashboard .zevoice-notice-icon {
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    background: #f59e0b !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
}

.zevoice-dashboard .zevoice-notice-icon svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.zevoice-dashboard .zevoice-notice-content {
    flex: 1 !important;
}

.zevoice-dashboard .zevoice-notice-content h4 {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #92400e !important;
    background: none !important;
    border: none !important;
}

.zevoice-dashboard .zevoice-notice-content p {
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #78350f !important;
    line-height: 1.6 !important;
    background: none !important;
}

.zevoice-dashboard .zevoice-btn-request {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 20px !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35) !important;
}

.zevoice-dashboard .zevoice-btn-request svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.zevoice-dashboard .zevoice-btn-request.zevoice-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

/* Visuels Grid */
.zevoice-dashboard .zevoice-visuals-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
}

.zevoice-dashboard .zevoice-visual-item {
    display: block !important;
}

.zevoice-dashboard .zevoice-visual-item > label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 12px !important;
    background: none !important;
}

/* Modern Image Upload */
.zevoice-dashboard .zevoice-image-upload-modern {
    width: 100% !important;
}

.zevoice-dashboard .zevoice-upload-zone {
    position: relative !important;
    width: 140px !important;
    height: 140px !important;
    border: 2px dashed #cbd5e1 !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

.zevoice-dashboard .zevoice-upload-wide .zevoice-upload-zone {
    width: 100% !important;
    height: 120px !important;
}

.zevoice-dashboard .zevoice-upload-zone:hover {
    border-color: #3b82f6 !important;
    background: #eff6ff !important;
}

.zevoice-dashboard .zevoice-upload-zone.has-image {
    border-style: solid !important;
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
}

.zevoice-dashboard .zevoice-upload-placeholder {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.zevoice-dashboard .zevoice-upload-placeholder svg {
    color: #cbd5e1 !important;
    stroke: #cbd5e1 !important;
}

.zevoice-dashboard .zevoice-upload-placeholder span {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    background: none !important;
}

.zevoice-dashboard .zevoice-upload-zone.has-image .zevoice-upload-placeholder {
    opacity: 0 !important;
}

.zevoice-dashboard .zevoice-upload-preview {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
}

.zevoice-dashboard .zevoice-upload-preview img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    border-radius: 6px !important;
}

.zevoice-dashboard .zevoice-remove-image {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
    background: rgba(239, 68, 68, 0.9) !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    z-index: 10 !important;
}

.zevoice-dashboard .zevoice-remove-image svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

/* Form Actions */
.zevoice-dashboard .zevoice-form-actions {
    text-align: center !important;
    padding: 8px 0 16px !important;
    background: none !important;
}

.zevoice-dashboard .zevoice-submit-btn-modern {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 32px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35) !important;
}

.zevoice-dashboard .zevoice-submit-btn-modern svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.zevoice-dashboard .zevoice-submit-btn-modern:hover {
    transform: translateY(-2px) !important;
}

/* Spinner */
.zevoice-dashboard .zevoice-spinner {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-top-color: #fff !important;
    border-radius: 50% !important;
    animation: zevoice-spin 0.8s linear infinite !important;
}

@keyframes zevoice-spin {
    to { transform: rotate(360deg); }
}

/* Responsive for Modern Config */
@media (max-width: 768px) {
    .zevoice-dashboard .zevoice-config-card-header {
        padding: 20px !important;
    }

    .zevoice-dashboard .zevoice-config-card-body {
        padding: 20px !important;
    }

    .zevoice-dashboard .zevoice-config-icon {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }

    .zevoice-dashboard .zevoice-config-icon svg {
        width: 20px !important;
        height: 20px !important;
    }

    .zevoice-dashboard .zevoice-visuals-grid {
        grid-template-columns: 1fr !important;
    }

    .zevoice-dashboard .zevoice-upload-zone {
        width: 100% !important;
        height: 120px !important;
    }

    .zevoice-dashboard .zevoice-autre-crm-notice {
        flex-direction: column !important;
    }

    .zevoice-dashboard .zevoice-btn-request {
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .zevoice-dashboard .zevoice-config-card-header {
        flex-direction: column !important;
        text-align: center !important;
    }

    .zevoice-dashboard .zevoice-config-icon {
        margin: 0 auto !important;
    }

    .zevoice-dashboard .zevoice-config-card-title {
        text-align: center !important;
    }

    .zevoice-dashboard .zevoice-submit-btn-modern {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Optional / Required indicators */
.zevoice-dashboard .zevoice-required {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

.zevoice-dashboard .zevoice-optional {
    color: #94a3b8 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
}

/* ============================================
   Modern Navigation Tabs
   ============================================ */

.zevoice-dashboard .zevoice-dashboard-nav-modern {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 32px !important;
    padding: 6px !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border-radius: 16px !important;
    border: none !important;
}

.zevoice-dashboard .zevoice-nav-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 14px 24px !important;
    text-decoration: none !important;
    color: #64748b !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    transition: all 0.25s ease !important;
    background: transparent !important;
    border: none !important;
    flex: 1 !important;
    justify-content: center !important;
}

.zevoice-dashboard .zevoice-nav-item svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #64748b !important;
    transition: stroke 0.25s ease !important;
    flex-shrink: 0 !important;
}

.zevoice-dashboard .zevoice-nav-item:hover {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
}

.zevoice-dashboard .zevoice-nav-item:hover svg {
    stroke: #3b82f6 !important;
}

.zevoice-dashboard .zevoice-nav-item.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35) !important;
}

.zevoice-dashboard .zevoice-nav-item.active svg {
    stroke: #ffffff !important;
}

@media (max-width: 768px) {
    .zevoice-dashboard .zevoice-dashboard-nav-modern {
        flex-direction: column !important;
        gap: 6px !important;
    }

    .zevoice-dashboard .zevoice-nav-item {
        justify-content: flex-start !important;
        padding: 12px 18px !important;
    }
}

/* ============================================
   Email Generator Full Width Styles
   ============================================ */

.zevoice-dashboard .zevoice-email-generator-full {
    width: 100% !important;
    max-width: none !important;
}

.zevoice-dashboard .zevoice-email-section {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 24px 28px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
}

.zevoice-dashboard .zevoice-email-label {
    display: block !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 8px !important;
}

.zevoice-dashboard .zevoice-email-hint {
    font-size: 14px !important;
    color: #64748b !important;
    margin: 0 0 16px 0 !important;
}

.zevoice-dashboard .zevoice-email-input {
    width: 100% !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.zevoice-dashboard .zevoice-email-input:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.zevoice-dashboard .zevoice-email-preview-container {
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.zevoice-dashboard .zevoice-email-textarea {
    width: 100% !important;
    min-height: 180px !important;
    padding: 20px !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    resize: vertical !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.zevoice-dashboard .zevoice-email-textarea:focus {
    outline: none !important;
    background: #fefefe !important;
}

/* NPS Preview in Email */
.zevoice-dashboard .zevoice-nps-preview {
    padding: 24px 20px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    text-align: center !important;
}

.zevoice-dashboard .zevoice-nps-question {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 20px !important;
}

.zevoice-dashboard .zevoice-nps-scale {
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    margin-bottom: 12px !important;
}

.zevoice-dashboard .zevoice-nps-btn {
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    cursor: default !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.zevoice-dashboard .zevoice-nps-labels {
    display: flex !important;
    justify-content: space-between !important;
    max-width: 400px !important;
    margin: 0 auto 16px !important;
    font-size: 12px !important;
    color: #64748b !important;
}

.zevoice-dashboard .zevoice-nps-info {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: #64748b !important;
    margin: 0 !important;
    padding: 12px !important;
    background: rgba(59, 130, 246, 0.08) !important;
    border-radius: 8px !important;
}

.zevoice-dashboard .zevoice-nps-info svg {
    stroke: #3b82f6 !important;
    flex-shrink: 0 !important;
}

/* Copy buttons */
.zevoice-dashboard .zevoice-copy-row {
    display: flex !important;
    gap: 12px !important;
    margin-top: 16px !important;
    flex-wrap: wrap !important;
}

.zevoice-dashboard .zevoice-copy-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: #f1f5f9 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.zevoice-dashboard .zevoice-copy-btn:hover {
    background: #e2e8f0 !important;
    color: #334155 !important;
}

.zevoice-dashboard .zevoice-copy-btn svg {
    stroke: currentColor !important;
}

.zevoice-dashboard .zevoice-copy-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.zevoice-dashboard .zevoice-copy-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
}

.zevoice-dashboard .zevoice-save-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #059669 !important;
    background: #ecfdf5 !important;
    border: 2px solid #a7f3d0 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.zevoice-dashboard .zevoice-save-btn:hover {
    background: #d1fae5 !important;
    border-color: #6ee7b7 !important;
}

.zevoice-dashboard .zevoice-save-btn svg {
    stroke: #059669 !important;
}

/* NPS Info Box - Preview de la variable {nps_scale} */
.zevoice-dashboard .zevoice-nps-info-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 2px solid #93c5fd !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-top: 20px !important;
}

.zevoice-dashboard .zevoice-nps-info-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    color: #1e40af !important;
    font-size: 15px !important;
}

.zevoice-dashboard .zevoice-nps-info-header svg {
    stroke: #3b82f6 !important;
    flex-shrink: 0 !important;
}

.zevoice-dashboard .zevoice-nps-info-box p {
    font-size: 14px !important;
    color: #1e40af !important;
    margin: 0 0 16px 0 !important;
    line-height: 1.5 !important;
}

.zevoice-dashboard .zevoice-nps-info-box code {
    background: #1e40af !important;
    color: #ffffff !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.zevoice-dashboard .zevoice-nps-preview-mini {
    background: #ffffff !important;
    border-radius: 10px !important;
    padding: 20px !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15) !important;
}

/* NPS Scale - Force horizontal layout */
.zevoice-nps-preview-mini .zevoice-nps-scale,
.zevoice-nps-info-box .zevoice-nps-scale,
.zevoice-dashboard .zevoice-nps-preview-mini .zevoice-nps-scale {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    margin-bottom: 12px !important;
}

.zevoice-nps-preview-mini .zevoice-nps-btn,
.zevoice-nps-info-box .zevoice-nps-btn,
.zevoice-dashboard .zevoice-nps-preview-mini .zevoice-nps-btn {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.zevoice-nps-preview-mini .zevoice-nps-labels,
.zevoice-nps-info-box .zevoice-nps-labels,
.zevoice-dashboard .zevoice-nps-preview-mini .zevoice-nps-labels {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    font-size: 12px !important;
    color: #64748b !important;
}

.zevoice-dashboard .zevoice-nps-question-mini {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 16px !important;
    line-height: 1.4 !important;
}

.zevoice-dashboard .zevoice-nps-note {
    font-size: 13px !important;
    color: #64748b !important;
    margin: 16px 0 0 0 !important;
    font-style: italic !important;
}

@media (max-width: 600px) {
    .zevoice-dashboard .zevoice-nps-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }

    .zevoice-nps-preview-mini .zevoice-nps-btn,
    .zevoice-nps-info-box .zevoice-nps-btn,
    .zevoice-dashboard .zevoice-nps-preview-mini .zevoice-nps-btn {
        width: 24px !important;
        min-width: 24px !important;
        max-width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
    }

    .zevoice-nps-preview-mini .zevoice-nps-scale,
    .zevoice-nps-info-box .zevoice-nps-scale,
    .zevoice-dashboard .zevoice-nps-preview-mini .zevoice-nps-scale {
        gap: 2px !important;
    }

    .zevoice-dashboard .zevoice-copy-row {
        flex-direction: column !important;
    }

    .zevoice-dashboard .zevoice-copy-btn,
    .zevoice-dashboard .zevoice-save-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}
