/**
 * استایل‌های مشترک ابزارها
 */

/* ریست و تنظیمات پایه */
.novin-tool-container * {
    box-sizing: border-box;
    font-family: 'danaFaNum', sans-serif;
}

.novin-tool-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(112, 67, 242, 0.08);
    direction: rtl;
}

/* هدر ابزار */
.novin-tool-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f5f5f5;
}

.novin-tool-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.novin-tool-description {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* بدنه ابزار */
.novin-tool-body {
    margin-bottom: 30px;
}

/* گروه ورودی */
.novin-input-group {
    margin-bottom: 24px;
}

.novin-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.novin-icon {
    color: #7043f2;
    flex-shrink: 0;
}

.novin-input,
.novin-textarea,
.novin-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'danaFaNum', sans-serif;
    color: #333;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    outline: none;
}

.novin-input:focus,
.novin-textarea:focus,
.novin-select:focus {
    background: #ffffff;
    border-color: #7043f2;
    box-shadow: 0 0 0 4px rgba(112, 67, 242, 0.1);
}

.novin-input::placeholder,
.novin-textarea::placeholder {
    color: #adb5bd;
}

.novin-textarea {
    min-height: 120px;
    resize: vertical;
}

.novin-input-hint {
    display: block;
    font-size: 13px;
    color: #868e96;
    margin-top: 6px;
}

/* دکمه‌ها */
.novin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'danaFaNum', sans-serif;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    line-height: 1.5;
}

.novin-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.novin-btn:hover::before {
    width: 300px;
    height: 300px;
}

.novin-btn-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.novin-btn:hover .novin-btn-icon {
    transform: scale(1.1);
}

.novin-btn-primary {
    background: linear-gradient(135deg, #7043f2 0%, #5c35c9 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(112, 67, 242, 0.3);
}

.novin-btn-primary:hover {
    background: linear-gradient(135deg, #5c35c9 0%, #4a2ba8 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(112, 67, 242, 0.4);
}

.novin-btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(112, 67, 242, 0.3);
}

.novin-btn-secondary {
    background: #ffffff;
    color: #7043f2;
    border: 2px solid #7043f2;
    box-shadow: 0 2px 8px rgba(112, 67, 242, 0.1);
}

.novin-btn-secondary:hover {
    background: #f8f4ff;
    border-color: #5c35c9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(112, 67, 242, 0.2);
}

.novin-btn-icon {
    flex-shrink: 0;
}

.novin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* لودینگ */
.novin-loading {
    text-align: center;
    padding: 60px 20px;
}

.novin-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7043f2;
    border-radius: 50%;
    animation: novin-spin 1s linear infinite;
}

@keyframes novin-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.novin-loading p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* پیام خطا */
.novin-error-message {
    padding: 16px 20px;
    background: #fff5f5;
    border: 2px solid #feb2b2;
    border-radius: 10px;
    color: #c53030;
    font-size: 15px;
    margin-bottom: 20px;
}

/* پیام موفقیت */
.novin-success-message {
    padding: 16px 20px;
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 10px;
    color: #15803d;
    font-size: 15px;
    margin-bottom: 20px;
}

/* نتایج */
.novin-results {
    margin-top: 30px;
}

/* تب‌ها */
.novin-tabs {
    margin-top: 30px;
}

.novin-tabs-header {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.novin-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'danaFaNum', sans-serif;
    color: #6c757d;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.novin-tab-btn:hover {
    color: #7043f2;
    background: rgba(112, 67, 242, 0.05);
}

.novin-tab-btn.active {
    color: #7043f2;
    border-bottom-color: #7043f2;
}

.novin-tab-icon {
    flex-shrink: 0;
}

.novin-tab-panel {
    display: none;
}

.novin-tab-panel.active {
    display: block;
    animation: novin-fade-in 0.3s ease;
}

@keyframes novin-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* کارت‌ها */
.novin-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.novin-card:hover {
    border-color: #7043f2;
    box-shadow: 0 4px 12px rgba(112, 67, 242, 0.1);
}

/* اکشن‌ها */
.novin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f5f5f5;
}

/* گرید */
.novin-grid {
    display: grid;
    gap: 20px;
}

.novin-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.novin-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* متریک‌ها */
.novin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.novin-metric-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.novin-metric-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.novin-metric-success {
    background: #d1fae5;
    color: #065f46;
}

.novin-metric-warning {
    background: #fef3c7;
    color: #92400e;
}

.novin-metric-error {
    background: #fee2e2;
    color: #991b1b;
}

.novin-metric-info {
    background: #dbeafe;
    color: #1e40af;
}

.novin-metric-content {
    flex: 1;
}

.novin-metric-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.novin-metric-label {
    display: block;
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .novin-tool-container {
        padding: 20px;
    }
    
    .novin-tool-title {
        font-size: 24px;
    }
    
    .novin-tool-description {
        font-size: 14px;
    }
    
    .novin-tabs-header {
        gap: 4px;
    }
    
    .novin-tab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .novin-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .novin-actions {
        flex-direction: column;
    }
    
    .novin-btn {
        width: 100%;
    }
}

/* یوتیلیتی */
.novin-text-center {
    text-align: center;
}

.novin-mt-20 {
    margin-top: 20px;
}

.novin-mb-20 {
    margin-bottom: 20px;
}

.novin-hidden {
    display: none !important;
}
