/**
 * استایل فرم سفارش PCB
 *
 * @package PCB_Gerber_Viewer
 */

/* Container اصلی */
.pcb-order-form-wrapper {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* بخش آپلود */
.pcb-upload-section {
    margin-bottom: 2rem;
}

.pcb-upload-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Dropzone */
.pcb-dropzone {
    border: 3px dashed #3498db;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pcb-dropzone:hover,
.pcb-dropzone.pcb-dragover {
    border-color: #2980b9;
    background: #e3f2fd;
    transform: scale(1.02);
}

.pcb-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pcb-upload-icon {
    color: #3498db;
    opacity: 0.7;
}

.pcb-dropzone-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.pcb-dropzone-subtext {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin: 0;
}

/* اطلاعات آپلود */
.pcb-upload-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border-right: 4px solid #ffc107;
    border-radius: 4px;
}

.pcb-upload-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #856404;
}

/* نوار پیشرفت */
.pcb-progress-bar {
    position: relative;
    width: 100%;
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.pcb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
    width: 0%;
}

.pcb-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

/* پیام‌ها */
.pcb-message {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.pcb-message.success {
    background: #d4edda;
    border-right: 4px solid #28a745;
    color: #155724;
}

.pcb-message.error {
    background: #f8d7da;
    border-right: 4px solid #dc3545;
    color: #721c24;
}

.pcb-message.info {
    background: #d1ecf1;
    border-right: 4px solid #17a2b8;
    color: #0c5460;
}

/* بخش مشخصات */
.pcb-specs-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.pcb-specs-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.pcb-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pcb-spec-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pcb-spec-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.pcb-spec-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
}

/* انتخاب رنگ */
.pcb-color-selector {
    margin-top: 1.5rem;
}

.pcb-color-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.pcb-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.pcb-select:focus {
    outline: none;
    border-color: #3498db;
}

/* بخش قیمت */
.pcb-pricing-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: #ffffff;
}

.pcb-pricing-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.pcb-price-breakdown {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.pcb-price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.pcb-price-row:last-child {
    border-bottom: none;
}

.pcb-price-total {
    font-size: 1.3rem;
    font-weight: 700;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

/* دکمه */
.pcb-btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.pcb-btn-primary {
    background: #ffffff;
    color: #667eea;
}

.pcb-btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pcb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* RTL Support */
[dir="rtl"] .pcb-upload-info,
[dir="rtl"] .pcb-message.success,
[dir="rtl"] .pcb-message.error,
[dir="rtl"] .pcb-message.info {
    border-right: none;
    border-left: 4px solid;
}

/* Responsive */
@media (max-width: 768px) {
    .pcb-order-form-wrapper {
        padding: 1rem;
    }

    .pcb-specs-grid {
        grid-template-columns: 1fr;
    }

    .pcb-dropzone {
        padding: 2rem 1rem;
    }
}

/* انیمیشن لودینگ */
@keyframes pcb-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pcb-loading {
    animation: pcb-pulse 1.5s ease-in-out infinite;
}
