/**
 * Shortcode Styles for WP Dynamic Survey Plugin
 * Enhanced shortcode display and functionality
 */

/* ==========================================================================
   Survey Container Enhancements
   ========================================================================== */

.wp-dynamic-survey-container {
    position: relative;
    margin: 20px 0;
    clear: both;
}

.wp-dynamic-survey-container.disable-scroll {
    overflow: hidden;
}

/* Survey Header */
.survey-header {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
}

.survey-title {
    color: #1d2327;
    font-size: 28px;
    font-weight: 600;
}

.survey-description {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Print Options */
.survey-print-options {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.survey-print-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #666;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.survey-print-btn:hover {
    background: #e0e0e0;
    border-color: #999;
}

@media print {
    .survey-print-options {
        display: none;
    }

    .wp-dynamic-survey-container.print-enabled {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
    }
}

/* ==========================================================================
   Theme Variations
   ========================================================================== */

/* Minimal Theme */
.survey-theme-minimal {
    background: transparent;
    border: none;
    box-shadow: none;
}

.survey-theme-minimal .survey-header {
    background: transparent;
    border: none;
    padding: 10px 0;
}

.survey-theme-minimal .question-content {
    background: transparent;
    border: 1px solid #e0e0e0;
    box-shadow: none;
}

/* Modern Theme */
.survey-theme-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    color: white;
}

.survey-theme-modern .survey-header {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.survey-theme-modern .survey-title {
    color: white;
}

.survey-theme-modern .survey-description {
    color: rgba(255, 255, 255, 0.9);
}

.survey-theme-modern .question-content {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* Card Theme */
.survey-theme-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.survey-theme-card .survey-header {
    background: #2271b1;
    color: white;
    margin: 0;
    border-radius: 0;
    border: none;
}

.survey-theme-card .survey-title {
    color: white;
}

.survey-theme-card .survey-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Full Width Theme */
.survey-theme-full-width {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 40px calc(50vw - 50%);
    background: #f8f9fa;
}

.survey-theme-full-width .survey-header {
    margin: 0 auto;
}

.survey-theme-full-width .survey-content {
    margin: 0 auto;
}

/* ==========================================================================
   Survey List Styles
   ========================================================================== */

.survey-list {
    margin: 20px 0;
}

.survey-list-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.survey-list-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.1);
}

.survey-list-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.survey-list-title a {
    color: #1d2327;
    text-decoration: none;
}

.survey-list-title a:hover {
    color: #2271b1;
}

.survey-list-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.survey-list-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #888;
}

.survey-list-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.survey-list-stats span:before {
    content: "📊";
    font-size: 12px;
}

.survey-list-actions {
    text-align: right;
}

/* ==========================================================================
   Survey Statistics Styles
   ========================================================================== */

.survey-stats {
    margin: 20px 0;
}

/* Inline Format */
.survey-stats.format-inline .survey-stats-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
}

.survey-stats.format-inline .stat-item {
    font-size: 14px;
}

/* Table Format */
.survey-stats.format-table .survey-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.survey-stats.format-table .survey-stats-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.survey-stats.format-table .stat-label {
    font-weight: 600;
    color: #1d2327;
    width: 60%;
}

.survey-stats.format-table .stat-value {
    color: #2271b1;
    font-weight: 600;
    text-align: right;
}

/* Cards Format */
.survey-stats.format-cards .survey-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.survey-stats.format-cards .stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.survey-stats.format-cards .stat-card:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.1);
}

.survey-stats.format-cards .stat-label {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.survey-stats.format-cards .stat-value {
    display: block;
    color: #2271b1;
    font-size: 24px;
    font-weight: 600;
}

/* ==========================================================================
   Survey Button Styles
   ========================================================================== */

.survey-button {
    display: inline-block;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    text-align: center;
    line-height: 1;
}

/* Button Sizes */
.survey-button.size-small {
    padding: 8px 16px;
    font-size: 14px;
}

.survey-button.size-medium {
    padding: 12px 24px;
    font-size: 16px;
}

.survey-button.size-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Button Colors */
.survey-button.color-primary {
    background: #2271b1;
    color: white;
}

.survey-button.color-primary:hover {
    background: #135e96;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.survey-button.color-secondary {
    background: #6c757d;
    color: white;
}

.survey-button.color-secondary:hover {
    background: #545b62;
    color: white;
}

.survey-button.color-success {
    background: #198754;
    color: white;
}

.survey-button.color-success:hover {
    background: #146c43;
    color: white;
}

.survey-button.color-warning {
    background: #ffc107;
    color: #000;
}

.survey-button.color-warning:hover {
    background: #e0a800;
    color: #000;
}

.survey-button.color-danger {
    background: #dc3545;
    color: white;
}

.survey-button.color-danger:hover {
    background: #bb2d3b;
    color: white;
}

/* Link Style */
.survey-button.survey-button-link {
    background: transparent;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.survey-button.survey-button-link.color-primary {
    color: #2271b1;
}

.survey-button.survey-button-link.color-primary:hover {
    border-bottom-color: #2271b1;
    background: transparent;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Survey Embed Styles
   ========================================================================== */

.survey-embed-container {
    position: relative;
    margin: 20px 0;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.survey-embed-container iframe {
    display: block;
    border: none;
    width: 100%;
}

/* ==========================================================================
   Error Styles
   ========================================================================== */

.wp-dynamic-survey-error {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
}

.wp-dynamic-survey-error strong {
    font-weight: 600;
}

.survey-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .survey-theme-full-width {
        padding: 20px 15px;
    }

    .survey-list-stats {
        flex-direction: column;
        gap: 10px;
    }

    .survey-stats.format-inline .survey-stats-inline {
        flex-direction: column;
        gap: 10px;
    }

    .survey-stats.format-cards .survey-stats-cards {
        grid-template-columns: 1fr;
    }

    .survey-button.size-large {
        width: 100%;
        padding: 16px 20px;
    }

    .survey-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .survey-theme-modern {
        padding: 15px;
        border-radius: 12px;
    }

    .survey-list-item {
        padding: 15px;
    }

    .survey-title {
        font-size: 20px;
    }

    .survey-description {
        font-size: 14px;
    }

    .survey-button.size-medium,
    .survey-button.size-large {
        width: 100%;
        padding: 14px 20px;
    }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

.survey-button:focus,
.survey-list-title a:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.survey-stats[role="region"] {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .survey-theme-modern {
        background: #000;
        color: #fff;
    }

    .survey-button {
        border: 2px solid currentColor;
    }

    .survey-list-item {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .survey-button,
    .survey-list-item,
    .stat-card {
        transition: none;
    }

    .survey-button:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .survey-theme-modern {
        background: white !important;
        color: black !important;
    }

    .survey-button {
        border: 1px solid black;
        background: white !important;
        color: black !important;
    }

    .survey-list-item {
        border: 1px solid black;
        break-inside: avoid;
    }
}