/* ============================================
   Modal خيارات التصميم - بسيط وأنيق جداً
   Design Options Modal - Simple & Elegant
   ============================================ */

/* Overlay - خلفية شفافة مع blur */
.design-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.design-modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container - الحاوية الرئيسية */
.design-modal {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header - الرأس */
.design-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 24px 24px 0 0;
}

.design-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.design-modal-title i {
    color: #7C3AED;
}

.design-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F3F4F6;
    border: none;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.125rem;
}

.design-modal-close:hover {
    background: #E5E7EB;
    color: #111827;
    transform: rotate(90deg);
}

/* Modal Body - المحتوى */
.design-modal-body {
    padding: 1.5rem;
}

/* Design Info - معلومات التصميم */
.design-modal-info {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.design-modal-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: white;
}

.design-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-modal-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.design-modal-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.design-modal-category {
    font-size: 0.8125rem;
    color: #6B7280;
}

.design-modal-price {
    font-size: 1.125rem;
    font-weight: 800;
    color: #7C3AED;
    margin-top: 0.25rem;
}

/* Options Form - نموذج الخيارات */
.design-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Option Group - مجموعة خيار */
.modal-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-option-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.modal-option-label .required {
    color: #EF4444;
}

.modal-option-label .optional {
    color: #9CA3AF;
    font-weight: 400;
    font-size: 0.8125rem;
}

/* Radio Options - خيارات Radio */
.modal-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.modal-radio-option {
    position: relative;
}

.modal-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.modal-radio-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #6B7280;
    font-size: 0.9375rem;
    user-select: none;
}

.modal-radio-option label:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.modal-radio-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    border-color: #7C3AED;
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

/* Checkbox Options - خيارات Checkbox */
.modal-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.modal-checkbox-option {
    position: relative;
}

.modal-checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.modal-checkbox-option label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
    user-select: none;
}

.modal-checkbox-option label:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.modal-checkbox-option input[type="checkbox"]:checked + label {
    background: rgba(124, 58, 237, 0.05);
    border-color: #7C3AED;
    color: #7C3AED;
}

.modal-checkbox-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modal-checkbox-option input[type="checkbox"]:checked + label .modal-checkbox-icon {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    border-color: #7C3AED;
}

.modal-checkbox-option input[type="checkbox"]:checked + label .modal-checkbox-icon::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 0.625rem;
}

/* Input Field - Head Size */
.modal-input-field {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.2s ease;
    font-family: 'Cairo', sans-serif;
    background: #F9FAFB;
}

.modal-input-field:focus {
    outline: none;
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background: white;
}

.modal-input-field::placeholder {
    color: #9CA3AF;
}

/* Notes Textarea */
.modal-notes-textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 0.875rem;
    color: #374151;
    resize: vertical;
    min-height: 80px;
    transition: all 0.2s ease;
    font-family: 'Cairo', sans-serif;
}

.modal-notes-textarea:focus {
    outline: none;
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.modal-notes-textarea::placeholder {
    color: #9CA3AF;
}

/* Divider */
.modal-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 0.5rem 0;
}

/* Hidden Sections */
.modal-option-section {
    display: none;
}

.modal-option-section.active {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Footer - الزر */
.design-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #F3F4F6;
    position: sticky;
    bottom: 0;
    background: white;
    border-radius: 0 0 24px 24px;
}

.design-modal-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.design-modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.design-modal-submit:active {
    transform: translateY(0);
}

.design-modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Scrollbar Styling */
.design-modal::-webkit-scrollbar {
    width: 6px;
}

.design-modal::-webkit-scrollbar-track {
    background: #F9FAFB;
}

.design-modal::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.design-modal::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Responsive */
@media (max-width: 640px) {
    .design-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }
    
    .design-modal-header {
        border-radius: 20px 20px 0 0;
    }
    
    .modal-radio-group {
        grid-template-columns: 1fr;
    }
    
    .design-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
