@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

.bm-form-wrapper {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    color: #334155;
    box-sizing: border-box;
}

.bm-form-wrapper * {
    box-sizing: border-box;
}

.bm-login-required {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.bm-login-required h2 {
    margin-bottom: 2rem;
    color: #0f172a;
}

.bm-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    overflow: hidden;
}

.bm-header {
    background: linear-gradient(110deg, #0c4a6e, #06b6d4);
    padding: 3rem 2rem 2rem;
    color: white;
    text-align: center;
}

.bm-header h2 {
    color: white;
    margin: 0 0 2rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.bm-progress-bar {
    background: rgba(255,255,255,0.2);
    height: 8px;
    border-radius: 4px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.bm-progress {
    background: #fff;
    height: 100%;
    width: 20%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.bm-steps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    opacity: 0.9;
}

.bm-steps-labels span.active {
    font-weight: 700;
    color: #fff;
}

#bm-solar-form {
    padding: 2rem;
}

.bm-step {
    display: none;
    animation: fadeIn 0.4s;
}

.bm-step.bm-step-active {
    display: block;
}

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

.bm-step h3 {
    font-size: 1.4rem;
    color: #0f172a;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.bm-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.bm-type-card {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bm-type-card:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.bm-type-card.selected {
    border-color: #0ea5e9;
    background: #e0f2fe;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.bm-type-card h4 {
    color: #0369a1;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.bm-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.bm-field {
    display: flex;
    flex-direction: column;
}

.bm-field.full-width {
    grid-column: 1 / -1;
}

.bm-field label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #475569;
}

.bm-field .required {
    color: #ef4444;
}

.bm-field input, .bm-field select, .bm-field textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: #0f172a !important;
    background-color: #ffffff !important;
    transition: border-color 0.3s;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
}

.bm-field select option {
    color: #0f172a !important;
    background-color: #ffffff !important;
}

.bm-field input:focus, .bm-field select:focus, .bm-field textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.bm-field input:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

#bm-map {
    height: 250px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
}

.bm-calc-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.bm-res-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.bm-res-card h4 {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.bm-val {
    color: #0369a1;
    font-size: 1.25rem;
    font-weight: 700;
}

.bm-form-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.bm-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.bm-btn-primary {
    background: #0ea5e9;
    color: white;
}

.bm-btn-primary:hover {
    background: #0284c7;
}

.bm-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.bm-btn-secondary:hover {
    background: #e2e8f0;
}

.bm-btn-success {
    background: #10b981;
    color: white;
}

.bm-btn-success:hover {
    background: #059669;
}

.bm-success-box {
    text-align: center;
    padding: 3rem 1rem;
}

.bm-success-box .bm-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.bm-success-box h3 {
    color: #10b981;
}

.bm-review-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.bm-review-wrap th, .bm-review-wrap td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
}

.bm-review-wrap th {
    color: #64748b;
    width: 40%;
}

@media (max-width: 640px) {
    .bm-type-grid, .bm-fields-grid, .bm-calc-results {
        grid-template-columns: 1fr;
    }
}
