/* Calculator Styles - Plăci full width */
.poly-calc-compact {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.poly-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.poly-form-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poly-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.poly-form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.poly-input-small,
.poly-select-small {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    transition: border-color 0.15s ease-in-out;
}

.poly-input-small:focus,
.poly-select-small:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.1);
}

.poly-input-small {
    min-height: 36px;
}

.poly-select-small {
    height: 36px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23495057' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
}

/* Preview Section - Plăci full width */
.poly-preview-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    min-height: 450px; /* Asigură spațiu pentru canvas */
}

.poly-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.poly-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #343a40;
}

.poly-board-info {
    font-size: 14px;
    color: #495057;
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Boards Container - Scroll orizontal pentru plăci */
.poly-boards-container {
    width: 100%;
    display: flex;
    gap: 25px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #adb5bd #f1f1f1;
    min-height: 450px; /* Spațiu pentru canvas */
    align-items: center;
    justify-content: flex-start;
}

.poly-boards-container::-webkit-scrollbar {
    height: 8px;
}

.poly-boards-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.poly-boards-container::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.poly-boards-container::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* Fiecare placă - dimensiuni FIXE pentru vizibilitate */
.poly-board-canvas {
    flex: 0 0 auto;
    background: #fff;
    border: 3px solid #343a40;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
    width: 800px !important; /* Forțează dimensiunea */
    height: 400px !important; /* Forțează dimensiunea */
    margin: 0 10px;
}

.poly-board-canvas:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Scroll indicator pentru plăci - ÎMBUNĂTĂȚIT */
.poly-boards-scroll-info {
    display: flex !important; /* Forțează afișarea */
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    border-radius: 8px;
    color: white;
    font-weight: 500;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Butoane scroll - STILURI CLARE pentru stări */
.poly-scroll-left,
.poly-scroll-right {
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Stil pentru butoane ACTIVATE */
.poly-scroll-left.enabled,
.poly-scroll-right.enabled {
    opacity: 1;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
}

.poly-scroll-left.enabled:hover,
.poly-scroll-right.enabled:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Stil pentru butoane DEZACTIVATE */
.poly-scroll-left.disabled,
.poly-scroll-right.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.1);
}

.poly-scroll-indicator {
    font-size: 16px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Actions Section */
.poly-actions-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.poly-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.poly-btn-secondary:hover {
    background: #5a6268;
}

.poly-btn-primary {
    background: #007cba;
    color: #fff;
    flex: 1;
    max-width: 250px;
}

.poly-btn-primary:hover {
    background: #006ba1;
}

.poly-price-box {
    flex: 1;
    min-width: 250px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
}

.poly-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #495057;
    margin-bottom: 6px;
}

.poly-price-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 2px solid #dee2e6;
}

.poly-price-total strong {
    color: #28a745;
    font-size: 18px;
}

.poly-note {
    flex: 1;
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
    padding: 12px;
    background: #e9ecef;
    border-radius: 4px;
}

/* Material info in price box */
#pp-material-info {
    font-size: 13px;
    color: #17a2b8;
    margin-bottom: 10px;
    padding: 8px;
    background: #e6f3ff;
    border-radius: 4px;
    border-left: 4px solid #17a2b8;
}

/* Discount styling */
#pp-discount strong {
    color: #dc3545;
}

/* Loading state */
.poly-board-canvas.font-changing {
    opacity: 0.7;
    transition: opacity 0.3s;
}

/* Form validation */
.poly-input-small:invalid,
.poly-select-small:invalid {
    border-color: #dc3545;
}

.poly-input-small:valid,
.poly-select-small:valid {
    border-color: #28a745;
}

/* Button disabled state */
.poly-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Price box improvements */
#poly-price-box strong {
    font-weight: 600;
}

#pp-boards {
    color: #007cba;
}

#pp-total {
    color: #28a745;
}

/* Hide/show transitions */
#poly-illumination-row,
#poly-illumination-type-row {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Focus states for accessibility */
.poly-btn:focus,
.poly-input-small:focus,
.poly-select-small:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Compact select dropdown styling */
.poly-select-small option {
    padding: 8px;
    font-size: 14px;
}

/* Skeleton loading */
.poly-board-skeleton {
    width: 100%;
    min-height: 300px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Highlight pentru placa curentă */
.poly-board-canvas.active {
    border-color: #007cba;
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

/* Efect de tranziție între plăci */
.poly-boards-container {
    scroll-behavior: smooth;
}

/* Mesaj de eroare sau stare goală */
.poly-no-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    color: #6c757d;
    font-size: 16px;
    font-style: italic;
}

/* Animatie pentru indicator */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive pentru desktop */
@media (min-width: 1200px) {
    .poly-board-canvas {
        width: 800px !important;
        height: 400px !important;
    }
}

@media (min-width: 993px) and (max-width: 1199px) {
    .poly-board-canvas {
        width: 700px !important;
        height: 350px !important;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .poly-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .poly-board-canvas {
        width: 600px !important;
        height: 300px !important;
    }
    
    .poly-scroll-left,
    .poly-scroll-right {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .poly-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .poly-actions-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .poly-btn {
        width: 100%;
        max-width: none;
    }
    
    .poly-price-box {
        width: 100%;
    }
    
    .poly-preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .poly-boards-container {
        padding: 15px 10px;
        min-height: 250px;
    }
    
    .poly-board-canvas {
        width: 300px !important;
        height: 150px !important;
    }
    
    .poly-scroll-left,
    .poly-scroll-right {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .poly-scroll-indicator {
        font-size: 14px;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .poly-board-canvas {
        width: 280px !important;
        height: 140px !important;
    }
    
    .poly-scroll-left,
    .poly-scroll-right {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .poly-scroll-indicator {
        font-size: 12px;
        min-width: 70px;
    }
}