/**
 * أنماط الواجهة الأمامية لطلبات القهوة الموسمية
 * 
 * @package SeasonalCoffeeOrders
 */

.sco-order-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sco-form-title {
    text-align: center;
    color: #8B4513;
    font-size: 2.5em;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.sco-order-form {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.sco-form-row {
    margin-bottom: 25px;
}

.sco-form-group {
    position: relative;
}

.sco-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 16px;
}

/* Remove the default asterisk from labels */
.sco-form-label::after {
    content: none;
}

/* Add asterisk only to required fields */
.sco-form-required .sco-form-label::after {
    content: ' *';
    color: #dc3545;
}

.sco-form-input,
.sco-form-select,
.sco-form-textarea {
    width: 100%;
    padding: 0px 15px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: inherit;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: inherit;
    box-sizing: border-box;
}

.sco-form-input:focus,
.sco-form-select:focus,
.sco-form-textarea:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.08);
    transform: translateY(-2px);
}

/* Remove focus outline for form elements */
.sco-form-select:focus,
.sco-form-textarea:focus,
.sco-form-input:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1) !important;
    border-color: #e0e0e0 !important;
}

/* Remove default focus outline for all elements */
*:focus {
    outline: none;
}

/* Style for textarea elements */
.sco-form-textarea {
    border: 1px solid #e0e0e0 !important;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
}

/* Hover effect for textarea */
.sco-form-textarea:hover {
    border-color: #c0c0c0 !important;
}

/* Style for the form group containing textareas */
.sco-form-group .sco-form-textarea {
    margin-top: 5px;
}

.sco-form-input.sco-input-error,
.sco-form-select.sco-input-error,
.sco-form-textarea.sco-input-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.08);
}

.sco-form-input {
    height: 40px;
    line-height: 40px;
}

.sco-form-textarea {
    resize: vertical;
    min-height: 100px;
    padding: 12px 15px;
    line-height: 1.5;
}

.sco-form-help {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}

.sco-error-message {
    display: none;
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

.sco-submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sco-submit-btn:hover {
    background: linear-gradient(135deg, #A0522D 0%, #8B4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.sco-submit-btn:active {
    transform: translateY(0);
}

.sco-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sco-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sco-spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.sco-spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.sco-form-messages {
    margin-top: 20px;
}

.sco-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
}

.sco-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sco-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* تأثيرات بصرية إضافية */
.sco-form-group {
    position: relative;
}

.sco-form-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(139, 69, 19, 0.05) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 8px;
}

.sco-form-group:focus-within::before {
    opacity: 1;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .sco-order-form-container {
        padding: 10px;
    }
    
    .sco-order-form {
        padding: 25px;
    }
    
    .sco-form-title {
        font-size: 2em;
    }
    
    .sco-form-input,
    .sco-form-select,
    .sco-form-textarea {
        font-size: 16px; /* منع التكبير في iOS */
    }
}

@media (max-width: 480px) {
    .sco-order-form {
        padding: 20px;
    }
    
    .sco-form-title {
        font-size: 1.8em;
    }
    
    .sco-submit-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* تحسينات للقراءة */
.sco-form-label {
    line-height: 1.4;
}

.sco-form-input,
.sco-form-select,
.sco-form-textarea {
    line-height: 1.5;
}

/* تأثيرات التحميل */
.sco-loading {
    position: relative;
    overflow: hidden;
}

.sco-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* تحسينات للألوان */
.sco-form-input:valid {
    border-color: #28a745;
}

.sco-form-input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

/* تصميم خاص لحقول الاختيار */
.sco-form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238B4513' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 35px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 40px;
    line-height: 40px;
}

.sco-form-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238B4513' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.sco-form-select option {
    white-space: normal;
    font-size: inherit;
    font-family: inherit;
    padding: 8px 12px;
}

/* تحسينات للوصول */
.sco-form-input:focus-visible,
.sco-form-select:focus-visible,
.sco-form-textarea:focus-visible {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* تأثيرات الظل */
.sco-order-form {
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.1),
        0 1px 3px rgba(0,0,0,0.05);
}

.sco-submit-btn {
    box-shadow: 
        0 4px 6px rgba(139, 69, 19, 0.1),
        0 1px 3px rgba(139, 69, 19, 0.08);
}

/* تحسينات للطباعة */
@media print {
    .sco-order-form {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .sco-submit-btn {
        display: none;
    }
} 