:root {
    --primary: #0a5c4d;
    --primary-dark: #07423a;
    --bg: #f4f7f6;
    --card: #ffffff;
    --text: #1f2a28;
    --muted: #6b7a77;
    --error: #c0392b;
    --success: #1e7e4f;
    --border: #dfe6e4;
}

* { box-sizing: border-box; }

body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 24px 12px;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    background: var(--card);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.page-header {
    text-align: center;
}

.page-header .logo {
    display: block;
    width: calc(100% + 64px);
    max-width: none;
    margin: -32px -32px 24px;
    border-radius: 12px 12px 0 0;
}

.page-header h1 {
    margin: 0 0 4px;
    font-size: 26px;
    color: var(--primary-dark);
}

.page-header p {
    margin: 0 0 24px;
    color: var(--muted);
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.required { color: var(--error); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea, input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

fieldset {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

legend {
    font-weight: 600;
    padding: 0 6px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.payment-option input { margin: 0; }

.payment-details {
    margin-top: 12px;
    padding: 12px;
    background: #eef6f3;
    border-radius: 8px;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input { width: auto; }

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"]:hover { background: var(--primary-dark); }
button[type="submit"]:disabled { background: var(--muted); cursor: not-allowed; }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-weight: 600;
}

.alert.success { background: #e3f6ec; color: var(--success); }
.alert.error { background: #fdecea; color: var(--error); }
.hidden { display: none !important; }

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 24px;
    max-width: 480px;
}

.modal-content button {
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

a { color: var(--primary); }

/* ===== بوت الأسئلة الشائعة ===== */
#faq-bot-toggle {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 20px 0 8px;
    border-radius: 28px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    z-index: 999;
    animation: faq-bot-pulse 2.4s infinite;
}
#faq-bot-toggle:hover { background: var(--primary-dark); }

.faq-bot-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.faq-bot-toggle-text {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

@keyframes faq-bot-pulse {
    0% { box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 0 0 0 rgba(10,92,77,0.5); }
    70% { box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 0 0 10px rgba(10,92,77,0); }
    100% { box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 0 0 0 rgba(10,92,77,0); }
}

@media (max-width: 480px) {
    #faq-bot-toggle .faq-bot-toggle-text { display: none; }
    #faq-bot-toggle { padding: 0; width: 56px; justify-content: center; }
}

#faq-bot-panel {
    position: fixed;
    bottom: 90px;
    left: 24px;
    width: 320px;
    max-height: 460px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
}
#faq-bot-panel.hidden { display: none; }

.faq-bot-header {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}
.faq-bot-header button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.faq-bot-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

.faq-bot-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.faq-bot-msg {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    max-width: 85%;
    line-height: 1.5;
}
.faq-bot-msg.bot { background: #eef6f3; align-self: flex-start; }
.faq-bot-msg.user { background: var(--primary); color: white; align-self: flex-end; }

.faq-bot-quick {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.faq-bot-chip {
    text-align: right;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}
.faq-bot-chip:hover { background: #eef6f3; }

.faq-bot-form {
    display: flex;
    border-top: 1px solid var(--border);
    padding: 8px;
    gap: 6px;
}
.faq-bot-form input {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
}
.faq-bot-form button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}

@media (max-width: 480px) {
    #faq-bot-panel { width: calc(100% - 32px); left: 16px; right: 16px; }
}
