/**
 * Frontend styles for 3D Printing Quote Manager
 */

/* Main area */
.tdpq-quote-system {
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

/* Form area */
.tdpq-form-area {
    width: 100%;
    padding: 30px;
    overflow-y: auto;
    box-sizing: border-box;
}

.tdpq-form-area h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    font-weight: 700;
}

/* Fields within form area */
.tdpq-field-group {
    margin-bottom: 5px;
}

.tdpq-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.tdpq-field-group input,
.tdpq-field-group select,
.tdpq-field-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.tdpq-field-group input:focus,
.tdpq-field-group select:focus,
.tdpq-field-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* File upload support */
.tdpq-file-upload-system {
    position: relative;
}

.tdpq-file-upload-system input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tdpq-file-label-system {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    margin-bottom: 0;
}

.tdpq-file-label-system:hover {
    border-color: #0073aa;
    background: #f0f7ff;
}

.tdpq-file-label-system.drag-hover,
.tdpq-file-upload-system.drag-hover .tdpq-file-label-system {
    border-color: #0073aa;
    border-style: solid;
    background: #e7f3ff;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
}

.tdpq-file-icon {
    display: block;
    font-size: 20px;
    margin-right: 10px;
}

.tdpq-file-text {
    font-size: 16px;
    color: #666;
}

.tdpq-infill-description {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

/* 3D model preview */
.tdpq-preview-area {
    width: 100%;
    height: 400px;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

#tdpq-3d-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.tdpq-preview-placeholder {
    text-align: center;
    color: #666;
    z-index: 1;
    position: relative;
}

.tdpq-preview-controls-help {
    margin-top: 8px;
    text-align: right;
    color: #666;
}

.tdpq-preview-controls-help small {
    font-size: 0.8em;
    line-height: 1.5;
}

.tdpq-preview-controls-help strong {
    color: #333;
    margin-right: 4px;
}

.tdpq-preview-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.tdpq-preview-placeholder p {
    font-size: 18px;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.tdpq-preview-placeholder small {
    color: #999;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tdpq-preview-area {
        height: 300px;
    }

    .tdpq-form-area {
        padding: 20px;
    }
}

/* Quote details */
.tdpq-quote {
    padding-bottom: 25px;
}

.tdpq-quote-status {
    font-size: smaller;
    color: #666;
}

.tdpq-quote-info {
    font-size: smaller;
    margin-bottom: 20px;
}

.tdpq-quote-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    table-layout: auto;
}

.tdpq-quote-table td,
.tdpq-quote-table th {
    padding-top: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
    font-size: smaller;
    color: #333;
    text-align: left;
}

.tdpq-quote-table td:last-child,
.tdpq-quote-table th:last-child {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tdpq-quote-table td:first-child,
.tdpq-quote-table th:first-child {
    padding-left: 0;
}

.tdpq-quote-table th {
    font-weight: 700;
    font-size: smaller;
}

/* Buttons */
.tdpq-button {
    display: inline-block;
    padding: 10px 20px;
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tdpq-button:hover {
    background: #e0e0e0;
    border-color: #999;
}

/* Modal Dialog Styles */
.tdpq-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tdpq-modal-overlay.tdpq-modal-show {
    display: flex;
    opacity: 1;
}

.tdpq-modal-dialog {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.tdpq-modal-overlay.tdpq-modal-show .tdpq-modal-dialog {
    transform: scale(1);
}

.tdpq-modal-icon {
    font-size: 36px;
    text-align: center;
    margin-bottom: 12px;
}

.tdpq-modal-icon.tdpq-modal-success {
    color: #46b450;
}

.tdpq-modal-icon.tdpq-modal-error {
    color: #dc3232;
}

.tdpq-modal-icon.tdpq-modal-info {
    color: #0073aa;
}

.tdpq-modal-message {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

.tdpq-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.tdpq-modal-close:hover {
    color: #333;
}

.tdpq-modal-timer {
    text-align: center;
    font-size: 12px;
    color: #999;
}

.tdpq-modal-timer-bar {
    height: 3px;
    background: #e1e1e1;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.tdpq-modal-timer-progress {
    height: 100%;
    background: #0073aa;
    transition: width 0.1s linear;
}
