/**
 * استایل‌های کارت کلیدسازی مدرن
 * قسمتی از افزونه کلید مارکت
 */

/* متغیرهای رنگ و سایز */
:root {
    --card-primary: #3498db;
    --card-secondary: #2c3e50;
    --card-accent: #e74c3c;
    --card-text: #333333;
    --card-light-text: #666666;
    --card-background: #ffffff;
    --card-border: #eeeeee;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --gradient-start: #3498db;
    --gradient-end: #2c3e50;
    --success-color: #27ae60;
    --rating-color: #f39c12;
}
.km-faq-answer {
    margin: 10px;
}
/* کارت اصلی */
.modern-locksmith-card {
    background-color: var(--card-background);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--card-shadow);
    margin-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.modern-locksmith-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.modern-locksmith-card.card-hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* هدر گرادیانت */
.card-gradient-header {
    height: 60px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    position: relative;
}

/* بخش پروفایل و اطلاعات هویتی */
.locksmith-profile-header {
    display: flex;
    align-items: center;
    margin-top: -30px;
    margin-bottom: 15px;
    padding: 0 20px;
    position: relative;
}

.locksmith-icon-container {
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    margin-right: 15px;
    flex-shrink: 0;
}

.locksmith-icon {
    font-size: 32px;
    color: var(--card-primary);
}

.locksmith-identity {
    flex: 1;
}

.locksmith-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--card-text);
    margin: 0 0 5px;
}

/* رتبه‌بندی و نظرات */
.locksmith-rating {
    display: flex;
    align-items: center;
}

.rating-stars {
    display: flex;
    margin-right: 5px;
}

.star-icon {
    color: var(--rating-color);
    font-size: 14px;
    margin-right: 2px;
}

.review-count {
    font-size: 13px;
    color: var(--card-light-text);
}

/* اطلاعات تماس */
.contact-info-container {
    padding: 0 20px 12px;
    border-bottom: 1px solid var(--card-border);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    position: relative;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-icon {
    width: 20px;
    margin-left: 15px;
    font-size: 18px;
    text-align: center;
}

.contact-info-icon.phone {
    color: var(--card-accent);
}

.contact-info-icon.address {
    color: var(--card-primary);
}

.contact-info-icon.clock {
    color: var(--success-color);
}

.contact-info-text {
    flex: 1;
}

.contact-info-label {
    font-size: 12px;
    color: var(--card-light-text);
    margin-bottom: 4px;
}

.contact-info-value {
    font-size: 14px;
    color: var(--card-text);
    word-break: break-word;
}

/* شماره تماس مخفی شده */
.phone-masked {
    cursor: pointer;
    position: relative;
}

.phone-show-icon {
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--card-primary);
    font-size: 14px;
}

/* بخش خدمات */
.services-section {
    padding: 12px 20px;
    border-bottom: 1px solid var(--card-border);
}

.services-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.services-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--card-text);
    margin: 0;
}

.service-list-button {
    background: none;
    border: none;
    color: var(--card-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0;
}

.service-list-icon {
    font-size: 12px;
    margin-right: 5px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-tag {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--card-primary);
    border-radius: 15px;
    font-size: 12px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
}

.service-tag-icon {
    margin-left: 5px;
    font-size: 10px;
}

/* دکمه‌های عملیات */
.action-buttons {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
}

.action-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.action-button-icon {
    margin-left: 8px;
}

.map-button {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--card-primary);
}

.map-button:hover {
    background-color: rgba(52, 152, 219, 0.2);
}

.call-button {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--card-accent);
}

.call-button:hover {
    background-color: rgba(231, 76, 60, 0.2);
}

/* مودال سرویس‌ها */
.modal-service-list {
    padding: 15px 20px;
}

.modal-service-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.modal-service-item:last-child {
    border-bottom: none;
}

.modal-service-icon-container {
    width: 32px;
    height: 32px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.modal-service-icon {
    color: var(--card-primary);
    font-size: 12px;
}

.modal-service-name {
    font-size: 14px;
    color: var(--card-text);
}

/* دکمه مرتب‌سازی */
.km-sort-button {
    display: block;
    margin: 0 auto 20px;
    padding: 10px 20px;
    background-color: var(--card-primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.km-sort-button:hover {
    background-color: #2980b9;
}

.km-sort-button i {
    margin-left: 5px;
}

.km-sort-message {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
}

/* استایل محفظه نگهدارنده کارت‌ها */
.km-locksmiths-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    margin: 20px 0 !important;
    width: 100% !important;
    text-align: right !important;
    direction: rtl !important;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .locksmith-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .locksmith-icon-container {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .services-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .service-list-button {
        margin-top: 5px;
    }
    
    .service-tags {
        margin-top: 10px;
    }
}

/* تبلت (مثلا بزرگتر از 768px) */
@media (min-width: 768px) {
    .km-locksmiths-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    /* ... other existing responsive styles for tablet ... */
    .km-card-header {
        padding: 18px 12px;
    }
    
    /* ... rest of existing tablet styles ... */
}

/* دسکتاپ (مثلا بزرگتر از 1024px) */
@media (min-width: 1024px) {
    .km-locksmiths-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
    
    /* استایل‌های دسکتاپ برای کارت‌ها (اگر لازم باشد) */
    .km-card-header {
        padding: 24px 16px; /* بازگرداندن به استایل دسکتاپ */
    }
    
    .km-lock-icon {
        width: 64px;
        height: 64px;
        margin-left: 16px;
        font-size: 32px;
    }

    .km-locksmith-name {
        font-size: 24px;
    }
    
    .km-info-item {
        padding: 16px;
    }
    
    .km-info-icon {
        width: 48px;
        height: 48px;
    }
    
    .km-info-text p {
        font-size: 18px;
    }
    
    .km-btn {
        padding: 16px;
        font-size: 14px;
    }
}

/**
 * استایل‌های مدرن برای کارت کلیدسازی (بر اساس طرح React کاربر - بازنویسی کامل)
 */

/* کارت کلیدسازی جدید */
.km-new-locksmith-card {
    direction: rtl;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f5f5f5;
}

.km-new-locksmith-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* هدر کارت */
.km-card-header {
    background-color: #FFCC33;
    padding: 15px;
    text-align: center;
    border-bottom: none;
}

.km-locksmith-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* نشان خدمات 24 ساعته */
.km-24h-service-badge {
    background-color: #fff8e1;
    color: #333;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    margin: 10px 0 0 0;
}

.km-24h-service-badge i {
    margin-left: 5px;
    font-size: 14px;
    color: #e6b800;
}

/* بخش اطلاعات تماس */
.km-contact-section {
    padding: 10px;
}

.km-info-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.km-info-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.km-info-text h3 {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: #777;
}

.km-info-text p {
    font-size: 16px;
    margin: 0;
    font-weight: bold;
    color: #333;
}

.km-info-icon {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.km-info-icon.phone {
    background-color: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.km-info-icon.address {
    background-color: rgba(244, 67, 54, 0.15);
    color: #F44336;
}

.km-info-icon.hours {
    background-color: rgba(233, 30, 99, 0.15);
    color: #E91E63;
}

/* بخش خدمات */
.km-services-section {
    padding: 0 15px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.km-services-title {
    color: #ff9800;
    font-size: 16px;
    font-weight: bold;
    margin: 0;
}

.km-services-more {
    color: #2196F3;
    text-decoration: none;
    font-size: 14px;
}

/* بخش دکمه‌ها */
.km-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px;
}

.km-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-decoration: none;
}

.km-btn i {
    margin-left: 8px;
}

.km-btn-dark {
    background-color: #1a237e;
    color: white;
}

.km-btn-dark:hover {
    background-color: #0d1257;
}

.km-btn-map {
    background-color: #2196F3;
    color: white;
}

.km-btn-map:hover {
    background-color: #0d8aee;
}

/* افزودن فونت دانا */
@font-face {
    font-family: 'Dana';
    src: url('../assets/fonts/dana/DanaFaNum-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../assets/fonts/dana/DanaFaNum-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
h2.km-page-title {
    font-family: 'Dana';
}
h2 {
    font-family: 'Dana';
}
button.km-neighborhood-btn {
    font-family: 'Dana';
}
h3 {
    font-family: 'Dana';
}


h3.km-filter-title {
    font-family: 'Dana';
}

/* حذف پوزیشن ابسولوت از بج خدمات 24 ساعته */
.km-24h-service-badge {
    position: static;
    top: auto;
    right: auto;
}

/* سرویس‌ها */
.km-services-section {
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
}

/* استایل محفظه نگهدارنده کارت‌ها */
.km-locksmiths-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    margin: 20px 0;
}

/* مدیا کوئری‌ها برای رسپانسیو */
@media (min-width: 768px) {
    .km-locksmiths-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .km-locksmiths-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* حذف استایل‌های اضافی فریم مدرن */
.km-modern-frame {
    display: none !important;
}

/* Modal Styles (from React component - primarily for mobile) */
.km-services-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Ensure modal is on top */
    display: none; /* Managed by JS */
    align-items: flex-end;
    justify-content: center;
}

.km-services-modal.active {
    display: flex;
}

.km-services-modal-content {
    background-color: white;
    width: 100%;
    max-width: 500px; /* Adjust as needed */
    border-top-left-radius: 12px; /* rounded-t-xl */
    border-top-right-radius: 12px;
    padding: 24px; /* p-6 */
    animation: slide-up 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.km-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px; /* mb-6 */
}

.km-modal-title {
    font-size: 20px; /* text-xl */
    font-weight: 700; /* font-bold */
    margin: 0;
}

.km-modal-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.km-modal-close i {
    font-size: 24px; /* size-24 */
    color: #4b5563; /* text-gray-600 */
}

.km-services-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px; /* space-y-4 */
}

.km-service-item {
    display: flex;
    align-items: center;
    padding: 12px; /* p-3 */
    background-color: #f9fafb; /* bg-gray-50 */
    border-radius: 8px; /* rounded-lg */
}

.km-service-item-icon-wrapper {
    flex-shrink: 0;
    margin-left: 12px; /* ml-3 */
    padding: 8px; /* p-2 */
    background-color: #fef3c7; /* bg-amber-100 */
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* Ensure consistent size */
    height: 40px;
}

.km-service-item-icon-wrapper i {
    font-size: 20px; /* size-20 */
    color: #a16207; /* text-amber-700 */
}

.km-service-item-text {
    font-weight: 500; /* font-medium */
    color: #1f2937; /* text-gray-800 */
    font-size: 16px;
    flex-grow: 1;
    text-align: right;
}

.km-modal-footer {
    margin-top: 24px; /* mt-6 */
}

.km-modal-footer button {
    width: 100%;
    padding: 12px; /* p-3 */
    background-color: #f59e0b; /* bg-amber-500 */
    color: white;
    font-weight: 500; /* font-medium */
    border-radius: 8px; /* rounded-lg */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.km-modal-footer button:hover {
    background-color: #d97706; /* hover:bg-amber-600 */
} 
