/* أداة إنشاء فروض بمعلوماتك الشخصية — تنسيقات خاصة */

/* ─── خطوات الأكورديون ─── */
.step-panel {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    position: relative;
    z-index: 10;
}
.step-panel.open {
    max-height: 1500px; /* زيادة الطول ليستوعب الخانات في الهاتف */
    opacity: 1;
    padding-bottom: 20px;
}
@media (max-width: 640px) {
    .step-panel.open {
        padding-left: 5px;
        padding-right: 5px;
    }
}
.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: default;
    border-radius: 12px;
    transition: all 0.2s;
    position: relative;
    z-index: 20;
}
@media (max-width: 640px) {
    .step-header {
        padding: 10px 12px;
        gap: 8px;
    }
    .step-header h2 {
        font-size: 1rem;
    }
}
.step-header.done {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.step-header.active {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.step-header.locked {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    opacity: 0.65;
}
.step-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}
.step-badge.done   { background: #22c55e; color: white; }
.step-badge.active { background: #3b82f6; color: white; }
.step-badge.locked { background: #e5e7eb; color: #9ca3af; }

/* ─── بطاقات النماذج ─── */
.template-card {
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    background: white;
}
.template-card:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.15);
}
.template-card.selected {
    border-color: #1a3c6e;
    box-shadow: 0 0 0 3px rgba(26,60,110,0.2);
}
.template-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f1f5f9;
}
.template-card .card-footer {
    padding: 10px 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    align-items: center;
}

/* ─── نافذة معاينة PDF ─── */
#preview-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ─── زر التوليد ─── */
#generate-btn {
    background: linear-gradient(135deg, #1a3c6e 0%, #00b09b 100%);
    border: none;
    color: white;
    border-radius: 14px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    margin-top: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: none;
}
#generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,60,110,0.3);
}
#generate-btn.visible {
    display: block;
}
