/**
 * AC Pro Booking System Frontend Styles - Version 3.1.0
 * ملف CSS خارجي لتحقيق البنية المعيارية
 */

/* =============================================
 * متغيرات CSS (يتم تعريفها في PHP وحقنها في الـ div الرئيسي)
 * ============================================= */
/*
:root {
    --acpro-theme-color: #06B6D4; 
    --acpro-dark-color: #0599B8;
    --acpro-light-color: #E6F8FB;
}
*/

/* =============================================
 * الحاوية الرئيسية
 * ============================================= */
.acpro-booking-container {
    max-width: 500px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    direction: rtl;
    text-align: right;
}

.acpro-booking-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    padding: 30px;
    /* استخدام متغير اللون الأساسي */
    border-top: 5px solid var(--acpro-theme-color);
}

.acpro-booking-title {
    font-size: 24px;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    text-align: right;
}

/* =============================================
 * أقسام النموذج والعناوين
 * ============================================= */
.acpro-form-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #edf2f7;
}

.acpro-section-title {
    font-size: 18px;
    font-weight: 700;
    /* استخدام متغير اللون الداكن */
    color: var(--acpro-dark-color);
    margin-bottom: 15px;
    /* استخدام متغير اللون الأساسي */
    border-right: 3px solid var(--acpro-theme-color);
    padding-right: 10px;
}

/* =============================================
 * حقول الإدخال والاختيار
 * ============================================= */
.acpro-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.acpro-form-group {
    display: flex;
    flex-direction: column;
}

.acpro-label {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
}

.acpro-input, .acpro-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    background-color: #fcfcfc;
}

.acpro-input:focus, .acpro-select:focus {
    outline: none;
    /* استخدام متغير اللون الأساسي */
    border-color: var(--acpro-theme-color);
    /* استخدام متغير اللون الفاتح للظلال */
    box-shadow: 0 0 0 4px var(--acpro-light-color);
    background-color: #ffffff;
}

/* =============================================
 * البحث والخدمات المختارة
 * ============================================= */
.acpro-search-container {
    position: relative;
    margin-bottom: 20px;
}

.acpro-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
}

.acpro-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.acpro-search-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.acpro-search-item:hover {
    background: #f7fafc;
}

.acpro-selected-list {
    min-height: 50px;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 15px;
    background: #fafbfc;
}

.acpro-empty-state {
    color: #a0aec0;
    text-align: center;
    font-style: italic;
    padding: 10px 0;
}

.acpro-selected-service {
    background: white;
    /* استخدام متغير اللون الفاتح */
    border: 1px solid var(--acpro-light-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acpro-service-title {
    font-weight: 700;
    color: #2d3748;
}

.acpro-service-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.acpro-quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.acpro-quantity-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    /* استخدام متغير اللون الأساسي */
    background: var(--acpro-theme-color);
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.acpro-quantity-btn:hover {
    /* استخدام متغير اللون الداكن */
    background: var(--acpro-dark-color);
}

.acpro-quantity-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.acpro-quantity-display {
    font-size: 14px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.acpro-service-total {
    font-weight: 700;
    /* استخدام متغير اللون الأساسي */
    color: var(--acpro-theme-color);
    min-width: 60px;
    text-align: left;
}

.acpro-remove-btn {
    background: #fee2e2;
    color: #c53030;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

/* =============================================
 * الموقع والتواصل
 * ============================================= */
.acpro-locate-btn {
    /* استخدام متغير اللون الأساسي */
    background-color: var(--acpro-theme-color);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.3s;
    margin-top: 5px;
}

.acpro-locate-btn:hover {
    /* استخدام متغير اللون الداكن */
    background-color: var(--acpro-dark-color);
}

.acpro-locate-btn:disabled {
    background-color: #a0aec0;
    cursor: wait;
}

.acpro-location-info {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #edf2f7;
}

/* =============================================
 * الإجمالي وزر الإرسال
 * ============================================= */
.acpro-total-section {
    background: #f7fafc;
    padding: 18px;
    border-radius: 10px;
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #edf2f7;
}

.acpro-total-label {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

.acpro-total-price {
    font-size: 32px;
    font-weight: 900;
    /* استخدام متغير اللون الأساسي */
    color: var(--acpro-theme-color);
}

.acpro-submit-btn {
    /* لون الواتساب القياسي (Green) */
    background-color: #48bb78; 
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    width: 100%;
    margin-top: 25px;
    transition: background-color 0.3s;
    box-shadow: 0 4px 10px rgba(72, 187, 120, 0.3);
}

.acpro-submit-btn:hover {
    background-color: #38a169;
}

.acpro-submit-btn:disabled {
    background-color: #a0aec0;
    cursor: wait;
}

/* =============================================
 * رسائل الحالة
 * ============================================= */
.acpro-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: right;
}

.acpro-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.acpro-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =============================================
 * استجابة التصميم (Media Query)
 * ============================================= */
@media (max-width: 500px) {
    .acpro-form-grid {
        grid-template-columns: 1fr;
    }
    .acpro-total-price {
        font-size: 24px;
    }
}

/* =============================================
 * أنماط إضافية للأيقونة العائمة والنافذة المنبثقة
 * ============================================= */
.acpro-floating-widget {
    position: fixed;
    z-index: 999999;
    transition: all 0.3s ease;
}

.acpro-floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

.acpro-floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.acpro-floating-btn:active {
    transform: translateY(-1px);
}

.acpro-floating-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-left: 8px;
}

.acpro-floating-btn .acpro-custom-icon {
    width: 24px;
    height: 24px;
    margin-left: 8px;
    border-radius: 4px;
}

.acpro-floating-small .acpro-floating-btn {
    padding: 10px 16px;
    font-size: 14px;
}

.acpro-floating-small .acpro-floating-btn .dashicons,
.acpro-floating-small .acpro-floating-btn .acpro-custom-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.acpro-floating-medium .acpro-floating-btn {
    padding: 12px 20px;
    font-size: 16px;
}

.acpro-floating-large .acpro-floating-btn {
    padding: 16px 24px;
    font-size: 18px;
}

.acpro-floating-large .acpro-floating-btn .dashicons,
.acpro-floating-large .acpro-floating-btn .acpro-custom-icon {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

/* النافذة المنبثقة */
.acpro-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: acpro-fadeIn 0.3s ease;
}

.acpro-modal-container {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: acpro-slideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.acpro-modal-header {
    padding: 20px;
    background: #06B6D4;
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acpro-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.acpro-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.acpro-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.acpro-modal-content {
    padding: 20px;
}

.acpro-modal-content .acpro-booking-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.acpro-modal-content .acpro-booking-card {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    border-top: none;
}

/* أنيماشن */
@keyframes acpro-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes acpro-slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* استجابة للهواتف */
@media (max-width: 600px) {
    .acpro-modal-container {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .acpro-floating-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .acpro-floating-btn .dashicons,
    .acpro-floating-btn .acpro-custom-icon {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 400px) {
    .acpro-floating-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .acpro-floating-btn .dashicons,
    .acpro-floating-btn .acpro-custom-icon {
        font-size: 16px;
        width: 16px;
        height: 16px;
        margin-left: 4px;
    }
}
/* =============================================
 * شريط الجملة المتحرك (التصميم المفضل)
 * ============================================= */
.acpro-quick-order-card {
    background: linear-gradient(90deg, #FF6B6B, #FFE66D, #1A936F);
    background-size: 200% 200%;
    color: #2D3047;
    padding: 15px 25px;
    border-radius: 50px;
    text-align: center;
    margin: 20px auto;
    font-weight: 800;
    font-size: 17px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    position: relative;
    animation: gradientMove 4s ease infinite, float 5s ease-in-out infinite;
    border: 3px solid white;
    max-width: 450px;
    transform: perspective(500px) rotateX(2deg);
    transition: all 0.3s ease;
}

.acpro-quick-order-card:hover {
    transform: perspective(500px) rotateX(0deg) translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: perspective(500px) rotateX(2deg) translateY(0); }
    50% { transform: perspective(500px) rotateX(2deg) translateY(-8px); }
}

.acpro-quick-order-card::before,
.acpro-quick-order-card::after {
    content: "✨";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    animation: sparkle 2.5s infinite;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.7));
}

.acpro-quick-order-card::before { 
    left: 20px; 
    animation-delay: 0.2s;
}

.acpro-quick-order-card::after { 
    right: 20px; 
    animation-delay: 0.7s;
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 1; 
        transform: translateY(-50%) scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: translateY(-50%) scale(1.2);
    }
}

.acpro-quick-order-text {
    margin: 0;
    padding: 0;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.acpro-quick-order-text::before {
    content: "🚀";
    animation: rocket 3s infinite;
}

.acpro-quick-order-text::after {
    content: "⚡";
    animation: bolt 2s infinite;
}

@keyframes rocket {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-3px) rotate(-5deg); }
    75% { transform: translateX(3px) rotate(5deg); }
}

@keyframes bolt {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* استجابة للهواتف */
@media (max-width: 500px) {
    .acpro-quick-order-card {
        padding: 12px 20px;
        font-size: 15px;
        margin: 15px auto;
        border-radius: 40px;
    }
    
    .acpro-quick-order-card::before,
    .acpro-quick-order-card::after {
        font-size: 18px;
    }
}