/* Twitter Engagement Calculator - Custom Styles */

/* Modal Animations */
.modal-show {
    display: flex !important;
    animation: fadeIn 0.3s ease-out;
}

.modal-hide {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Progress Indicators */
.progress-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--progress-color) 0%, var(--progress-color) var(--progress-percentage), #e5e7eb var(--progress-percentage), #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring::before {
    content: "";
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
}

.progress-ring .progress-text {
    position: absolute;
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--progress-color);
}

/* Metric Cards Animation */
.metric-card {
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Score Display */
.score-excellent {
    --progress-color: #10b981;
    --bg-color: #ecfdf5;
    --border-color: #10b981;
}

.score-good {
    --progress-color: #3b82f6;
    --bg-color: #eff6ff;
    --border-color: #3b82f6;
}

.score-average {
    --progress-color: #f59e0b;
    --bg-color: #fffbeb;
    --border-color: #f59e0b;
}

.score-poor {
    --progress-color: #ef4444;
    --bg-color: #fef2f2;
    --border-color: #ef4444;
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Responsive Chart */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }

    .progress-ring {
        width: 100px;
        height: 100px;
    }

    .progress-ring::before {
        width: 70px;
        height: 70px;
    }

    .progress-ring .progress-text {
        font-size: 1rem;
    }
}

/* Form Enhancements */
.form-input-enhanced {
    transition: all 0.2s ease;
    position: relative;
}

.form-input-enhanced:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.form-input-enhanced.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-input-enhanced.success {
    border-color: #10b981;
    background-color: #ecfdf5;
}

/* Success/Error Messages */
.message-success {
    background-color: #ecfdf5;
    border: 1px solid #10b981;
    color: #047857;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-error {
    background-color: #fef2f2;
    border: 1px solid #ef4444;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-warning {
    background-color: #fffbeb;
    border: 1px solid #f59e0b;
    color: #d97706;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-info {
    background-color: #eff6ff;
    border: 1px solid #3b82f6;
    color: #1d4ed8;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Button Enhancements */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-enhanced::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-enhanced:active {
    transform: scale(0.98);
}

/* Metric Value Animation */
.metric-value {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.metric-value.updating {
    color: #6b7280;
    animation: pulse 1s infinite;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.tooltip::before {
    content: "";
    position: absolute;
    bottom: 117%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
}

/* Comparison Bars */
.comparison-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #e5e7eb;
    overflow: hidden;
    position: relative;
}

.comparison-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.comparison-bar-fill.excellent {
    background: linear-gradient(90deg, #10b981, #059669);
}

.comparison-bar-fill.good {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.comparison-bar-fill.average {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.comparison-bar-fill.poor {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-full-width {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .bg-gradient-to-r {
        background: #f9fafb !important;
        color: #111827 !important;
    }
}

/* Dark Mode Support (if implemented) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-color: #4b5563;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Indicators */
.focus-enhanced:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-enhanced {
        border: 2px solid currentColor;
    }

    .metric-card {
        border: 2px solid #1f2937;
    }
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
