/**
 * DTF Gang Sheet Builder - Design List Styles
 */

.dtf-design-list {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dtf-design-list h4 {
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #333;
}

#dtf-designs-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#dtf-gangsheet-builder .dtf-design-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: box-shadow 0.2s;
}

.dtf-design-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dtf-design-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dtf-design-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.dtf-design-info {
    flex: 1;
    min-width: 0;
}

.dtf-design-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dtf-design-details {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.dtf-design-details span {
    padding: 2px 8px;
    background: #e9ecef;
    border-radius: 3px;
}

.dtf-design-details .text-warning {
    background: #fff3cd;
    color: #856404;
}

.dtf-design-details .text-info {
    background: #d1ecf1;
    color: #0c5460;
}

.dtf-design-details .badge {
    padding: 3px 8px;
    font-size: 11px;
}

.dtf-design-warnings {
    margin-top: 8px;
}

.dtf-design-warnings .alert {
    padding: 8px 12px;
    margin-bottom: 5px;
    font-size: 12px;
}

.dtf-design-warnings .alert:last-child {
    margin-bottom: 0;
}

#dtf-gangsheet-builder .dtf-design-controls {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.dtf-design-controls .form-group {
    margin-bottom: 0;
}

.dtf-design-controls .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #666;
}

.dtf-design-controls .form-control {
    width: 80px;
    height: 36px;
    padding: 4px 8px;
    font-size: 14px;
}

.dtf-design-controls .dtf-remove-design {
    margin-top: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dtf-design-controls .dtf-remove-design .material-icons {
    font-size: 18px;
}

/* Pricing Summary */
.dtf-pricing-summary {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 2px solid #28a745;
    border-radius: 8px;
}

.dtf-pricing-summary h4 {
    margin-bottom: 15px;
    color: #28a745;
    font-size: 1.2em;
}

.dtf-price-breakdown {
    margin-bottom: 20px;
}

.dtf-price-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.dtf-price-row:last-child {
    border-bottom: none;
    font-size: 1.1em;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #28a745;
}

.dtf-total-price {
    color: #28a745;
    font-weight: bold;
    font-size: 1.2em;
}

#dtf-add-to-cart {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .dtf-design-row {
        flex-wrap: wrap;
    }
    
    .dtf-design-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .dtf-design-controls {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .dtf-design-controls .form-control {
        width: 100%;
    }
}

.dtf-constrain-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
}

.dtf-constrain-checkbox input[type="checkbox"] {
    display: none;
}

.dtf-constrain-checkbox label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.dtf-constrain-checkbox .material-icons {
    font-size: 20px;
    color: #666;
    transition: color 0.2s;
}

.dtf-constrain-checkbox input:checked + label .material-icons {
    color: #28a745;
}

/* Loading state */
.dtf-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.dtf-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #28a745;
    border-radius: 50%;
    animation: dtf-spin 1s linear infinite;
}

#dtf-preview-canvas {
    max-width: 100%;
    height: auto;
    border: 2px solid #ddd;
    border-radius: 4px;
}

@keyframes dtf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}