/* Telegram Integration Styles */

.telegram-section {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.telegram-setup {
    text-align: center;
}

.telegram-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #0088cc, #229ED9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 136, 204, 0.3);
}

.telegram-setup h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.telegram-setup p {
    color: #64748b;
    margin-bottom: 2rem;
}

.telegram-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: right;
    max-width: 600px;
    margin: 0 auto;
}

.telegram-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.telegram-step:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(-5px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #64748b;
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.step-content code {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.telegram-input {
    width: 100%;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.telegram-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.telegram-help {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    margin-top: 2rem;
    color: #64748b;
    font-size: 0.875rem;
}

.telegram-help i {
    color: #3b82f6;
    font-size: 1.25rem;
}

/* Connected State */
.telegram-connected {
    text-align: center;
}

.telegram-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.05));
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 50px;
    color: #16a34a;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.telegram-status i {
    font-size: 1.25rem;
}

.telegram-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.telegram-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    text-align: right;
}

.telegram-info-item i {
    font-size: 1.25rem;
    color: #3b82f6;
}

.telegram-info-item code {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
}

.btn-danger {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Vazirmatn', sans-serif;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Toast Notifications */
.telegram-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10000;
    font-family: 'Vazirmatn', sans-serif;
}

.telegram-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.telegram-toast-success {
    border-right: 4px solid #22c55e;
}

.telegram-toast-success i {
    color: #22c55e;
    font-size: 1.25rem;
}

.telegram-toast-error {
    border-right: 4px solid #ef4444;
}

.telegram-toast-error i {
    color: #ef4444;
    font-size: 1.25rem;
}

.telegram-toast-info {
    border-right: 4px solid #3b82f6;
}

.telegram-toast-info i {
    color: #3b82f6;
    font-size: 1.25rem;
}

/* Dark Mode */
html[data-theme="dark"] .telegram-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.3));
    border-color: rgba(139, 92, 246, 0.3);
}

html[data-theme="dark"] .telegram-setup h3 {
    color: #f1f5f9;
}

html[data-theme="dark"] .telegram-step {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(139, 92, 246, 0.2);
}

html[data-theme="dark"] .telegram-step:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(139, 92, 246, 0.4);
}

html[data-theme="dark"] .step-content h4 {
    color: #f1f5f9;
}

html[data-theme="dark"] .telegram-input {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(139, 92, 246, 0.3);
    color: #f1f5f9;
}

html[data-theme="dark"] .telegram-info-item {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(139, 92, 246, 0.2);
    color: #cbd5e1;
}

html[data-theme="dark"] .telegram-toast {
    background: #1e293b;
    color: #f1f5f9;
}

/* Responsive */
@media (max-width: 768px) {
    .telegram-section {
        padding: 1.5rem;
    }
    
    .telegram-steps {
        gap: 1rem;
    }
    
    .telegram-step {
        padding: 1rem;
    }
    
    .telegram-toast {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
    }
}


/* Type Selection */
.telegram-type-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.telegram-type-option {
    cursor: pointer;
}

.telegram-type-option input[type="radio"] {
    display: none;
}

.type-card {
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.type-card i {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.type-card h4 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0.5rem 0;
}

.type-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.telegram-type-option input[type="radio"]:checked + .type-card {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.telegram-type-option:hover .type-card {
    border-color: #93c5fd;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 640px) {
    .telegram-type-selection {
        grid-template-columns: 1fr;
    }
}


/* Format Selection Section - جذاب و شیشه‌ای */
.telegram-format-section {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.95) 0%, rgba(224, 242, 254, 0.9) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 2px solid rgba(186, 230, 253, 0.5);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12),
                0 4px 16px rgba(2, 132, 199, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.telegram-format-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #0284c7, #0ea5e9, #0284c7, transparent);
    opacity: 0.6;
}

.telegram-format-section h4 {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0c4a6e, #0284c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.telegram-format-section h4 i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(2, 132, 199, 0.3));
}

.telegram-format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.format-option {
    cursor: pointer;
    position: relative;
}

.format-option input[type="radio"] {
    display: none;
}

.format-card {
    padding: 1.75rem 1.5rem;
    border: 3px solid rgba(224, 242, 254, 0.6);
    border-radius: 16px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 249, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.format-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.6s ease;
}

.format-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    display: inline-block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(2, 132, 199, 0.2));
}

.format-card h5 {
    font-size: 1.125rem;
    font-weight: 800;
    color: #0c4a6e;
    margin: 0.75rem 0 0.5rem;
    letter-spacing: -0.02em;
}

.format-card p {
    font-size: 0.875rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.format-option.active .format-card,
.format-option input[type="radio"]:checked + .format-card {
    border-color: #0284c7;
    background: linear-gradient(135deg, rgba(240, 249, 255, 1) 0%, rgba(224, 242, 254, 1) 100%);
    box-shadow: 0 12px 32px rgba(2, 132, 199, 0.25),
                0 6px 16px rgba(14, 165, 233, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 1),
                0 0 0 4px rgba(2, 132, 199, 0.1);
    transform: translateY(-4px) scale(1.02);
}

.format-option.active .format-card::before,
.format-option input[type="radio"]:checked + .format-card::before {
    left: 100%;
}

.format-option.active .format-card i,
.format-option input[type="radio"]:checked + .format-card i {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 6px 12px rgba(2, 132, 199, 0.4));
}

.format-option:hover .format-card {
    border-color: #38bdf8;
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.2),
                0 4px 12px rgba(2, 132, 199, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 1);
}

.format-option:hover .format-card::before {
    left: 100%;
}

.format-option:hover .format-card i {
    transform: scale(1.1);
}

.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Dark Mode */
html[data-theme="dark"] .telegram-format-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15),
                0 4px 16px rgba(167, 139, 250, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .telegram-format-section::before {
    background: linear-gradient(90deg, transparent, #8b5cf6, #a78bfa, #8b5cf6, transparent);
}

html[data-theme="dark"] .telegram-format-section h4 {
    background: linear-gradient(135deg, #c4b5fd, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html[data-theme="dark"] .telegram-format-section h4 i {
    background: linear-gradient(135deg, #a78bfa, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(139, 92, 246, 0.4));
}

html[data-theme="dark"] .format-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.7) 100%);
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .format-card i {
    background: linear-gradient(135deg, #a78bfa, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3));
}

html[data-theme="dark"] .format-card h5 {
    color: #e2e8f0;
}

html[data-theme="dark"] .format-card p {
    color: #94a3b8;
}

html[data-theme="dark"] .format-option.active .format-card,
html[data-theme="dark"] .format-option input[type="radio"]:checked + .format-card {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.3),
                0 6px 16px rgba(167, 139, 250, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 0 0 4px rgba(139, 92, 246, 0.15);
}

html[data-theme="dark"] .format-option:hover .format-card {
    border-color: #a78bfa;
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.25),
                0 4px 12px rgba(139, 92, 246, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Responsive */
@media (max-width: 640px) {
    .telegram-format-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .telegram-format-section {
        padding: 1.5rem;
    }
    
    .format-card {
        padding: 1.5rem 1.25rem;
    }
}


/* Sync Section Styles */
.telegram-sync-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: rgba(59, 130, 246, 0.05);
    border: 2px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
}

.telegram-sync-section button {
    width: 100%;
    margin-bottom: 0.75rem;
}

.sync-hint {
    color: #64748b;
    font-size: 0.8125rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.5;
}

.sync-hint i {
    color: #3b82f6;
    flex-shrink: 0;
}

[data-theme="dark"] .telegram-sync-section {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .sync-hint {
    color: #94a3b8;
}

[data-theme="dark"] .sync-hint i {
    color: #60a5fa;
}

/* Button styles */
.btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.btn-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    border: 2px solid rgba(100, 116, 139, 0.2);
}

.btn-secondary:hover {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
}

[data-theme="dark"] .btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
}
