/* Order Form - PrintIt Store - CLEAN VERSION */

/* Form Container */
.order-page {
    padding: 120px 0 80px;
    min-height: 100vh;
    background: #f8f9fa;
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(86, 118, 107, 0.1);
    color: #56766b;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: 40px;
    font-weight: 900;
    color: #1a1a1a;
    margin: 16px 0;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #56766b 0%, #2ecc71 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 18px;
    color: #666;
    margin-top: 12px;
}

/* Messages */
.message {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    font-size: 16px;
}

.message.show {
    display: block;
}

.success-message {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #27ae60;
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #c0392b;
}

/* Form Cards */
.form-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Product Type Selector */
.product-type-selector h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
    text-align: center;
}

.toggle-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.toggle-btn {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.toggle-btn:hover {
    border-color: #56766b;
    transform: translateY(-2px);
}

.toggle-btn.active {
    background: #56766b;
    border-color: #56766b;
    color: white;
}

.toggle-btn-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.toggle-btn-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.toggle-btn-subtitle {
    font-size: 16px;
    opacity: 0.8;
}

/* Product Info Box */
.product-info-box {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.product-info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-info-item {
    text-align: center;
}

.product-info-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-info-value {
    font-size: 24px;
    font-weight: 700;
    color: #56766b;
}

/* Format Selection */
.format-selection {
    display: none;
}

.format-selection.show {
    display: block;
}

.format-selection h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 700;
}

.format-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin: 12px 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.format-option:hover {
    border-color: #56766b;
}

.format-option.selected {
    border-color: #56766b;
    background: rgba(86, 118, 107, 0.05);
}

.format-option input[type="radio"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #56766b;
}

.format-details {
    flex: 1;
}

.format-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.format-badge {
    display: inline-block;
    background: #56766b;
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
}

.format-description {
    color: #666;
    font-size: 16px;
}

.format-price {
    font-size: 32px;
    font-weight: 900;
    color: #56766b;
    white-space: nowrap;
    min-width: 90px;
    text-align: left;
}

.price-note {
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    text-align: center;
    color: #1a1a1a;
    font-size: 16px;
}

/* Names Section */
.section-label {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.required {
    color: #e74c3c;
    font-size: 20px;
}

.help-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Name Groups */
.name-groups-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.name-group-row {
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.name-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.group-label {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.remove-group-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.remove-group-btn:hover {
    background: #c0392b;
}

.name-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    background: white;
    color: #1a1a1a;
    resize: vertical;
    min-height: 80px;
}

.name-input:focus {
    outline: none;
    border-color: #56766b;
    box-shadow: 0 0 0 3px rgba(86, 118, 107, 0.1);
}

/* Color Selector */
.color-selector-wrapper {
    margin-top: 16px;
    display: none;
}

.color-selector-wrapper.show {
    display: block;
}

.color-selector-label {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 12px;
    display: block;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.color-btn {
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.color-btn:hover {
    transform: scale(1.05);
}

.color-btn.selected {
    border-color: #56766b;
    box-shadow: 0 0 0 3px rgba(86, 118, 107, 0.2);
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.color-name {
    font-size: 12px;
    font-weight: 500;
    color: #1a1a1a;
}

/* Add Group Button */
.add-group-btn {
    width: 100%;
    padding: 16px;
    background: white;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    color: #56766b;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-group-btn:hover {
    background: #f8f9fa;
    border-color: #56766b;
    border-style: solid;
}

/* Price Summary */
.price-summary {
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 16px;
}

.price-row:last-child {
    border-bottom: none;
    padding-top: 16px;
    margin-top: 12px;
}

.price-row.total {
    font-size: 20px;
    font-weight: 700;
}

.price-row.total span:last-child {
    font-size: 32px;
    font-weight: 900;
    color: #56766b;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 20px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.submit-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

.submit-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.submit-btn[aria-busy="true"] .label {
    display: none;
}

.submit-btn[aria-busy="true"] .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer Hint */
.footer-hint {
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .toggle-buttons {
        grid-template-columns: 1fr;
    }

    .product-info-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .format-option {
        grid-template-columns: auto 1fr;
    }

    .format-price {
        grid-column: 2;
        text-align: right;
        font-size: 24px;
    }

    .color-options {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}
