/* استایل‌های اختصاصی صفحه تنظیمات دکمه اطلاعات تماس */

.header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #5a6268;
}

.main-container {
    margin-top: 20px;
}

/* تب‌ها */
.tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 15px;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #007bff;
    background: #f8f9fa;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* بخش‌ها */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.add-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: #218838;
}

/* لیست تماس‌ها */
.contacts-list {
    margin-bottom: 30px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.contact-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.contact-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.contact-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-type-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.contact-actions {
    display: flex;
    gap: 8px;
}

.contact-actions button {
    background: transparent;
    border: 1px solid #e9ecef;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s ease;
}

.contact-actions .edit-contact-btn:hover {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.contact-actions .delete-contact-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.contact-card-body {
    margin-top: 10px;
}

.contact-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.contact-type {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 8px 0;
}

.contact-link {
    font-size: 13px;
    color: #007bff;
    margin: 0;
    word-break: break-all;
}

.contact-link i {
    margin-left: 5px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* فرم */
.form-container {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #dc3545;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group .required {
    color: #dc3545;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.color-input-group input[type="text"] {
    flex: 1;
}

.form-help {
    display: block;
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.save-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.save-btn:hover:not(:disabled) {
    background: #218838;
}

.save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* تنظیمات ظاهر */
.appearance-form {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
}

/* وضعیت ویجت */
.widget-status-section {
    margin-top: 20px;
}

.status-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.status-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.status-info p {
    color: #6c757d;
    margin: 0;
}

.toggle-widget-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.toggle-widget-btn.active {
    background: #dc3545;
    color: white;
}

.toggle-widget-btn.active:hover {
    background: #c82333;
}

.toggle-widget-btn.inactive {
    background: #28a745;
    color: white;
}

.toggle-widget-btn.inactive:hover {
    background: #218838;
}

.toggle-widget-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.loading i {
    margin-left: 10px;
    font-size: 20px;
}

.loading.hidden {
    display: none;
}

/* Result Message */
.result-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.result-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.result-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.result-message a {
    color: #007bff;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .tabs-container {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .add-btn {
        width: 100%;
        justify-content: center;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .status-card {
        flex-direction: column;
        text-align: center;
    }

    .toggle-widget-btn {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .save-btn,
    .cancel-btn {
        width: 100%;
        justify-content: center;
    }
}

