/* Main Configurator Styles - Updated Color Scheme */

/* Root Variables */
:root {
    --primary-color: #dd773b;
    --primary-dark: #c96a33;
    --primary-darker: #b85d2b;
    --secondary-color: #121212;
    --secondary-light: #2d2d2d;
    --accent-color: #f8f9fa;
    --border-color: #e9ecef;
    --text-color: #121
}
/* Main configurator container */
.configurator-wrapper-template {
    display: flex;
    flex-wrap: wrap;
    max-height: fit-content;
    max-width: fit-content;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    color: #121212;
}

/* Preview section */
.configurator-preview-template {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background-color: #f4f4f4;
    margin: 25px;
    text-align: center;
    border: 1px solid #c3c3c3;
}

.preview-image-template {
    max-width: 100%;
    height: 80vh;
    margin: auto;
    border: 1px solid #c3c3c3;
    background-color: #fff;
    
}

.config-section-overflow{
    height: 400px;
    overflow-y: auto;
}

/* Options section */
.configurator-options-template {
    flex: 1;
    max-width: 400px;
    padding: 20px;
}

/* Form sections */
.config-section-template {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    padding: 10px;
    background-color: #f4f4f4;
    
    border: 1px solid #c3c3c3;
}

.config-section-template-price {       
    margin-bottom: 5px;
    padding: 10px;
    background-color: #f4f4f4;
    
    border: 1px solid #c3c3c3;
}

.config-section-template-buttons {      
    margin-bottom: 5px;
    padding: 10px;
    background-color: #f4f4f4;
    
    border: 1px solid #c3c3c3;
}

.config-section-template h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #121212;
    font-size: 16px;
    font-weight: 600;
}

/* Form controls */
select, input[type="number"] {
    width: 75%;
    padding: 10px;
    border: 1px solid #c3c3c3;
    border-radius: 6px;
    font-size: 16px;
    color: #121212;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

select:focus, input[type="number"]:focus {
    border-color: #dd773b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(221, 119, 59, 0.2);
}

select:disabled {
    background-color: #c3c3c3;
    cursor: not-allowed;
    color: #666;
}

/* Width input fields */
.width-input {
    position: relative;
}

.width-input input {
    padding-right: 50px;
    margin-bottom: 3px;
}

.width-input .unit {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* Price section */
.price-details {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #fff;
    
    border: 2px solid #dd773b;
    box-shadow: 0 2px 4px rgba(221, 119, 59, 0.1);
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    padding: 5px 0;
    border-bottom: 1px solid #c3c3c3;
    font-size: 14px;
    color: #121212;
}

.price-row.total {
    font-weight: bold;
    font-size: 16px;
    border-bottom: none;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 2px solid #dd773b;
    color: #dd773b;
}

#price-total{
    font-size: 20px;
    font-weight: bold;
    color: #dd773b;
}

/* Buttons */
.buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

button {
    padding: 12px 20px;
    background-color: #dd773b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(221, 119, 59, 0.2);
}

button:hover {
    background-color: #c86530;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(221, 119, 59, 0.3);
}

/* Specific button colors */
#export-pdf-btn {
    background-color: #dd773b;
    border: 2px solid #dd773b;
}

#export-pdf-btn:hover {
    background-color: #c86530;
    border-color: #c86530;
}

#export-e-post {
    background-color: #c3c3c3;
    color: #121212;
    border: 2px solid #c3c3c3;
}

#export-e-post:hover {
    background-color: #a8a8a8;
    border-color: #a8a8a8;
}

#order {
    background-color: #dd773b;
    border: 2px solid #dd773b;
}

#order:hover {
    background-color: #c86530;
    border-color: #c86530;
}

#calculate-price {
    background-color: #121212;
    color: white;
    border: 2px solid #121212;
}

#calculate-price:hover:not(:disabled) {
    background-color: #333;
    border-color: #333;
}

button:disabled {
    background-color: #c3c3c3;
    cursor: not-allowed;
    color: #666;
    border-color: #c3c3c3;
    transform: none;
    box-shadow: none;
}

/* PDF Actions Styling */
.pdf-actions {
    margin-top: 20px;
    padding: 20px;
    margin: 2px;
    background: #f8f9fa;
    
    text-align: center;
    border: 1px solid #dee2e6;
}

.pdf-actions .button {
    padding: 12px 24px;
    margin: 2px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 180px;
    justify-content: center;
}

.pdf-actions .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #6c757d !important;
}

.pdf-actions .button.primary {
    background-color: #dc3545;
    color: white;
}

.pdf-actions .button.primary:hover:not(:disabled) {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.pdf-actions .button.secondary {
    background-color: #007bff;
    color: white;
}

.pdf-actions .button.secondary:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Modal Styling for your existing modal */
#pdf-email-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
}

#pdf-email-modal .modal-content {
    background-color: #fefefe;
    padding: 0;
    border: 1px solid #888;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#pdf-email-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #DD773B, #F05E0A, #EDDD53);
    color: white;
    border-radius: 12px 12px 0 0;
}

#pdf-email-modal .modal-header h3 {
    margin: 0;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

#pdf-email-modal .close-modal {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

#pdf-email-modal .close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#pdf-email-modal .modal-body {
    padding: 25px;
}

.pdf-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 2px dashed #dee2e6;
}

.pdf-preview .pdf-icon {
    flex-shrink: 0;
}

.pdf-preview .pdf-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1em;
}

.pdf-preview .pdf-info p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

#pdf-email-form .form-group {
    margin-bottom: 20px;
}

#pdf-email-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#pdf-email-form .form-group input,
#pdf-email-form .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#pdf-email-form .form-group input:focus,
#pdf-email-form .form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#pdf-email-form .form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.form-actions .button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.form-actions .button.secondary {
    background-color: #6c757d;
    color: white;
}

.form-actions .button.secondary:hover {
    background-color: #545b62;
}

.form-actions .button.primary {
    background-color: #28a745;
    color: white;
}

.form-actions .button.primary:hover {
    background-color: #218838;
}

.form-actions .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal message styling */
.modal-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
}

.modal-message.show {
    display: block;
}

.modal-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.modal-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.modal-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Price display styling */
.price-display {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.price-display .price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
    .buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .config-section-template-buttons button,
    .buttons-container button {
        max-width: 100%;
    }

    .pdf-actions .button {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    #pdf-email-modal .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    #pdf-email-modal .modal-header,
    #pdf-email-modal .modal-body {
        padding: 15px;
    }
    
    .pdf-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .button {
        width: 100%;
    }
    
    .price-display .price-info {
        flex-direction: column;
        gap: 10px;
    }

}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

/* Notification styling */
#configurator-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    word-wrap: break-word;
}


/* Success/Error messages in modal */
.modal-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: none;
}

.modal-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.modal-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.modal-message.show {
    display: block;
}


/* Notification styles */
.configurator-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10001;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.configurator-notification.success {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.configurator-notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.configurator-notification.info {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.configurator-notification i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Required field indicator */
.modal-content label.required::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

/* Form field groups */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        padding: 20px;
        width: calc(100% - 20px);
    }
    
    .configurator-buttons {
        flex-direction: column;
    }
    
    .send-email-btn,
    .add-to-cart-btn {
        width: 100%;
        min-width: auto;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .configurator-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .modal-content h3 {
        font-size: 20px;
    }
    
    .send-email-btn,
    .add-to-cart-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Loading spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus styles for accessibility */
.send-email-btn:focus,
.add-to-cart-btn:focus,
.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Hover effects for better UX */
.modal-content input:hover,
.modal-content textarea:hover {
    border-color: #bdc3c7;
}

/* Error states */
.modal-content input.error,
.modal-content textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Export section styling */
.export-section {
    margin: 20px 0;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f4f4f4 0%, #fff 100%);
    border-radius: 12px;
    border: 2px solid #dd773b;
    box-shadow: 0 4px 12px rgba(221, 119, 59, 0.1);
}

.export-section h4 {
    color: #121212;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Styly pro existující tlačítka v konfiguratoru */
.config-section-template-buttons {
    margin-top: 30px;
    padding: 20px;
    background-color: #f4f4f4;
    
    border: 1px solid #c3c3c3;
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.buttons-container:last-child {
    margin-bottom: 0;
}

.config-section-template-buttons button {
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.config-section-template-buttons button,
.buttons-container button {
    max-width: 220px; /* Přidáno */
    width: 100%;
    box-sizing: border-box;
}

/* Loading state pro tlačítka */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PDF Loading overlay */
.pdf-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.pdf-loading-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(221, 119, 59, 0.3);
    border: 2px solid #dd773b;
}

.pdf-loading-content h3 {
    color: #121212;
    margin-bottom: 20px;
    font-weight: 600;
}

.spinner {
    border: 4px solid #c3c3c3;
    border-top: 4px solid #dd773b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Animace pro modaly */
.configurator-modal {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validační styly */
.form-group input.error,
.form-group textarea.error {
    border-color: #dd773b;
    box-shadow: 0 0 0 2px rgba(221, 119, 59, 0.3);
    background-color: rgba(221, 119, 59, 0.05);
}

.error-message {
    color: #dd773b;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

/* Success message */
.success-message {
    background-color: rgba(221, 119, 59, 0.1);
    border: 1px solid #dd773b;
    color: #121212;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
}

/* Component price breakdown table */
.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(221, 119, 59, 0.1);
}

.breakdown-table th,
.breakdown-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #c3c3c3;
    color: #121212;
}

.breakdown-table th {
    background-color: #dd773b;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.breakdown-table tr:hover {
    background-color: rgba(221, 119, 59, 0.05);
}

.breakdown-table tr:last-child td {
    border-bottom: none;
}

/* Enhanced button hover effects */
button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(221, 119, 59, 0.3);
}

button:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(221, 119, 59, 0.2);
}

/* Focus states for accessibility */
button:focus,
.btn:focus {
    outline: 2px solid #dd773b;
    outline-offset: 2px;
}

select:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: #dd773b;
    box-shadow: 0 0 0 3px rgba(221, 119, 59, 0.2);
}

/* Custom scrollbar for overflow sections */
.config-section-overflow::-webkit-scrollbar {
    width: 8px;
}

.config-section-overflow::-webkit-scrollbar-track {
    background: #f4f4f4;
    border-radius: 4px;
}

.config-section-overflow::-webkit-scrollbar-thumb {
    background: #dd773b;
    border-radius: 4px;
}

.config-section-overflow::-webkit-scrollbar-thumb:hover {
    background: #c86530;
}

/* Enhanced form styling */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.active {
    background-color: #dd773b;
    box-shadow: 0 0 0 2px rgba(221, 119, 59, 0.3);
}

.status-indicator.inactive {
    background-color: #c3c3c3;
}

/* Tooltip styling */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #121212;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Progress bar for multi-step forms */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #c3c3c3;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #dd773b;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Card-like sections */
.config-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #c3c3c3;
    box-shadow: 0 2px 8px rgba(221, 119, 59, 0.05);
    transition: all 0.3s ease;
}

.config-card:hover {
    box-shadow: 0 4px 16px rgba(221, 119, 59, 0.1);
    transform: translateY(-2px);
}

.config-card h4 {
    color: #121212;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 2px solid #dd773b;
    padding-bottom: 8px;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .configurator-wrapper-template {
        flex-direction: column;
        max-height: none;
    }
    
    .configurator-preview-template {
        margin: 10px;
        margin-bottom: 20px;
    }
    
    .configurator-options-template {
        max-width: none;
        padding: 15px;
    }
    
    .buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .config-section-template-buttons button {
        width: 100%;
        max-width: 280px;
    }
    
    .btn {
        margin: 5px 0;
        width: 100%;
        max-width: 280px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
    }
    
    .preview-image-template {
        height: 50vh;
    }
}

@media screen and (max-width: 480px) {
    .configurator-preview-template,
    .configurator-options-template {
        margin: 5px;
        padding: 10px;
    }
    
    .config-section-template {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .config-section-template h3 {
        text-align: center;
    }
    
    select, input[type="number"] {
        width: 100%;
    }
    
    .modal-content {
        width: 98%;
        margin: 2% auto;
        padding: 15px;
    }
    
    .config-summary {
        padding: 10px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
    }
    
    .breakdown-table th,
    .breakdown-table td {
        padding: 8px;
        font-size: 12px;
    }
}

/* Print styles */
@media print {
    .configurator-modal,
    .buttons-container,
    .config-section-template-buttons {
        display: none !important;
    }
    
    .configurator-wrapper-template {
        max-height: none;
    }
    
    .preview-image-template {
        height: auto;
        max-height: 400px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .config-section-template,
    .config-section-template-price,
    .config-section-template-buttons {
        border-width: 2px;
    }
    
    button {
        border: 2px solid #121212;
    }
    
    .btn-primary {
        border: 2px solid #dd773b;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinner {
        animation: none;
        border: 4px solid #dd773b;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Uncomment and customize if dark mode is needed
    .configurator-wrapper-template {
        background-color: #1a1a1a;
        color: #f4f4f4;
    }
    
    .config-section-template,
    .config-section-template-price,
    .config-section-template-buttons {
        background-color: #2a2a2a;
        border-color: #404040;
    }
    */
}
