/* 3D Print Calculator - Frontend Styles */

.tdp-calculator-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.tdp-calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.tdp-left-panel,
.tdp-right-panel {
    padding: 30px;
}

.tdp-left-panel {
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
}

.tdp-section {
    margin-bottom: 30px;
}

.tdp-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #2c3e50;
}

/* Model Choice - Large Card Style */
.tdp-model-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.tdp-choice-card {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #e2e8f0;
    border-radius: 20px;
    padding: 50px 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    overflow: hidden;
}

.tdp-choice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(76, 175, 80, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.tdp-choice-card:hover {
    border-color: #4CAF50;
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.2);
}

.tdp-choice-card:hover::before {
    opacity: 1;
}

.tdp-choice-card.active {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    box-shadow: 0 12px 40px rgba(76, 175, 80, 0.3);
    transform: translateY(-8px) scale(1.02);
}

.tdp-choice-card.active::after {
    content: '✓';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    z-index: 2;
}

.tdp-choice-icon {
    font-size: 80px;
    margin-bottom: 20px;
    line-height: 1;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.tdp-choice-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
    position: relative;
    z-index: 1;
}

.tdp-choice-description {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 1;
    max-width: 280px;
}

.tdp-choice-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .tdp-model-choice {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tdp-choice-card {
        min-height: 240px;
        padding: 40px 25px;
    }

    .tdp-choice-icon {
        font-size: 64px;
    }

    .tdp-choice-title {
        font-size: 20px;
    }

    .tdp-choice-description {
        font-size: 14px;
    }
}

/* CAD Section Styling */
.tdp-cad-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.tdp-cad-pricing {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
}

.tdp-cad-pricing h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
}

.tdp-cad-pricing ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.tdp-cad-pricing ul li {
    padding: 8px 0 8px 28px;
    font-size: 15px;
    position: relative;
    line-height: 1.5;
}

.tdp-cad-pricing ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 8px;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.tdp-cad-pricing .tdp-note {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
    font-style: italic;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
}

.tdp-dimensions-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tdp-dimensions-group input {
    width: 100%;
}

.tdp-file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.tdp-file-upload-area:hover {
    border-color: #3b82f6;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.tdp-file-upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.tdp-file-upload-area p {
    margin: 5px 0;
    color: #334155;
}

.tdp-file-upload-area .tdp-file-types {
    font-size: 12px;
    color: #64748b;
}

.tdp-files-list {
    margin-top: 15px;
}

.tdp-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.tdp-file-item:hover {
    background: #e2e8f0;
}

.tdp-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.tdp-file-icon {
    font-size: 24px;
}

.tdp-file-details {
    flex: 1;
}

.tdp-file-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    margin: 0 0 2px 0;
}

.tdp-file-size {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.tdp-file-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s ease;
}

.tdp-file-remove:hover {
    background: #dc2626;
}

.tdp-cad-info-box {
    background: #e0f2fe;
    border-left: 4px solid #0284c7;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    color: #0c4a6e;
    line-height: 1.6;
}

.tdp-cad-info-box strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

.tdp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.tdp-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Upload Area */
.tdp-upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
    z-index: 1;
}

.tdp-upload-area:hover {
    border-color: #4CAF50;
    background: #f0fdf4;
}

.tdp-upload-area.dragover {
    border-color: #4CAF50;
    background: #e8f5e9;
    transform: scale(1.02);
}

.tdp-upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
    pointer-events: none;
}

.tdp-upload-area p {
    margin: 5px 0;
    color: #4a5568;
    pointer-events: none;
}

.tdp-file-types {
    font-size: 12px;
    color: #718096;
    pointer-events: none;
}

#tdp-file-info {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

#tdp-file-info p {
    margin: 0 0 15px 0;
    word-break: break-all;
}

/* Form Groups */
.tdp-form-group {
    margin-bottom: 25px;
}

.tdp-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 14px;
}

.tdp-form-group select,
.tdp-form-group input[type="range"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.tdp-form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.tdp-form-group input[type="range"] {
    padding: 0;
    height: 6px;
    background: #e2e8f0;
    border: none;
    cursor: pointer;
}

.tdp-form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tdp-form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tdp-infill-marks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #718096;
    margin-top: 5px;
}

.tdp-form-group small {
    display: block;
    margin-top: 5px;
    color: #718096;
    font-size: 12px;
}

.tdp-form-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.tdp-btn-primary {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.tdp-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.tdp-btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
}

.tdp-btn-secondary {
    padding: 10px 20px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Multi-Model Support Styles */
#tdp-models-list {
    margin-top: 20px;
}

.tdp-model-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.tdp-model-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.tdp-model-card.active {
    border-color: #4CAF50;
    background: #f0fdf4;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.tdp-model-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.tdp-model-info {
    flex: 1;
}

.tdp-model-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 4px;
    word-break: break-word;
}

.tdp-model-specs {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #718096;
    margin-top: 8px;
}

.tdp-model-spec {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tdp-model-actions {
    display: flex;
    gap: 8px;
}

.tdp-model-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tdp-model-btn:hover {
    background: #f7fafc;
    border-color: #4CAF50;
}

.tdp-model-btn.remove {
    border-color: #fc8181;
    color: #e53e3e;
}

.tdp-model-btn.remove:hover {
    background: #fff5f5;
    border-color: #e53e3e;
}

.tdp-model-settings {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.tdp-model-field {
    display: flex;
    flex-direction: column;
}

.tdp-model-field label {
    font-size: 11px;
    color: #718096;
    margin-bottom: 4px;
    font-weight: 500;
}

.tdp-model-field select,
.tdp-model-field input {
    padding: 6px 8px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 12px;
}

.tdp-model-field select:focus,
.tdp-model-field input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#tdp-add-more-models {
    background: white;
    color: #4CAF50;
    border: 2px dashed #4CAF50;
}

#tdp-add-more-models:hover {
    background: #f0fdf4;
    border-color: #2e7d32;
    color: #2e7d32;
}

.tdp-btn-secondary:hover {
    background: #c53030;
}

/* 3D Viewer */
.tdp-3d-viewer {
    width: 100%;
    height: 400px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    position: relative;
}

.tdp-viewer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #718096;
}

.tdp-cube-icon {
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.tdp-viewer-placeholder p {
    font-size: 14px;
    margin: 0;
}

#tdp-model-info {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e2e8f0;
}

#tdp-model-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #2d3748;
}

/* Results */
.tdp-results {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.tdp-results h3 {
    color: white;
    margin: 0 0 20px 0;
}

.tdp-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tdp-result-item:last-child {
    border-bottom: none;
}

.tdp-result-item span {
    font-size: 14px;
}

.tdp-result-item strong {
    font-size: 18px;
}

.tdp-result-divider {
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

.tdp-result-total {
    font-size: 18px;
    padding-top: 15px;
}

.tdp-result-total span {
    font-size: 18px;
}

.tdp-result-total strong {
    font-size: 28px;
    font-weight: 700;
}

/* Order Section */
.tdp-order {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.tdp-order h3 {
    color: #2d3748;
    margin: 0 0 20px 0;
}

#tdp-order-form .tdp-form-group {
    margin-bottom: 20px;
}

#tdp-order-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

#tdp-order-form input,
#tdp-order-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

#tdp-order-form input:focus,
#tdp-order-form textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

#tdp-submit-order {
    width: 100%;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
    .tdp-calculator-container {
        grid-template-columns: 1fr;
    }

    .tdp-left-panel {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
}

@media (max-width: 640px) {
    .tdp-calculator-wrapper {
        padding: 0 10px;
        margin: 20px auto;
    }

    .tdp-left-panel,
    .tdp-right-panel {
        padding: 20px;
    }

    .tdp-3d-viewer {
        height: 300px;
    }

    .tdp-result-total strong {
        font-size: 22px;
    }
}

/* Customer Info Section */
.tdp-info-text {
    color: #4a5568;
    font-size: 14px;
    margin: -10px 0 15px 0;
    line-height: 1.5;
}

.tdp-form-group input[type="text"],
.tdp-form-group input[type="email"],
.tdp-form-group input[type="tel"],
.tdp-form-group input[type="number"],
.tdp-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tdp-form-group input[type="text"]:focus,
.tdp-form-group input[type="email"]:focus,
.tdp-form-group input[type="tel"]:focus,
.tdp-form-group input[type="number"]:focus,
.tdp-form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    background: #f0fdf4;
}

.tdp-form-group input[type="text"].error,
.tdp-form-group input[type="email"].error,
.tdp-form-group input[type="tel"].error,
.tdp-form-group textarea.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.tdp-form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.tdp-privacy-note {
    display: block;
    margin-top: 15px;
    padding: 10px;
    background: #f0fdf4;
    border-left: 3px solid #4CAF50;
    border-radius: 4px;
    color: #2d3748;
    font-size: 12px;
    line-height: 1.5;
}

.tdp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tdp-checkbox-label:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.tdp-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.tdp-checkbox-label span {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
}

.tdp-field-error {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
}
