/* Cost Analytics Page Styles - Extracted from templates/pages/cost_analytics.html */

.ldr-cost-analytics-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.ldr-cost-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.ldr-cost-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ldr-cost-title h1 {
    margin: 0;
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ldr-back-button {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.ldr-back-button:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.ldr-time-range-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ldr-time-range-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.ldr-time-range-btn:hover,
.ldr-time-range-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.ldr-cost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ldr-cost-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: transform 0.2s;
}

.ldr-cost-card:hover {
    transform: translateY(-2px);
}

.ldr-cost-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ldr-cost-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
}

.ldr-cost-card-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.ldr-cost-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.ldr-cost-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.ldr-chart-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ldr-chart-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ldr-chart-canvas {
    position: relative;
    height: 400px;
    width: 100%;
}

.ldr-cost-table {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.ldr-cost-table-header {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.ldr-cost-table-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ldr-cost-table-content {
    padding: 1rem;
}

.ldr-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.ldr-cost-item:last-child {
    border-bottom: none;
}

.ldr-cost-item-info {
    flex: 1;
}

.ldr-cost-item-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.ldr-cost-item-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ldr-cost-item-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.ldr-cost-optimization {
    background: rgba(var(--success-color-rgb), 0.1);
    border: 1px solid var(--success-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ldr-cost-optimization h3 {
    color: var(--success-color);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ldr-cost-optimization ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ldr-cost-optimization li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--success-color);
}

.ldr-cost-optimization li::before {
    content: '💡';
    position: absolute;
    left: 0;
}

.ldr-loading, .ldr-error, .ldr-no-data {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.ldr-loading i, .ldr-error i, .ldr-no-data i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.ldr-no-data {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.ldr-research-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.ldr-research-link:hover {
    text-decoration: underline;
}

/* Tooltip Styles */
.ldr-tooltip {
    position: relative;
    cursor: help;
    display: inline-block;
}

.ldr-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.4;
    max-width: 280px;
    min-width: 200px;
    width: max-content;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1001;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ldr-tooltip::before {
    content: '';
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1001;
}

.ldr-tooltip:hover::after,
.ldr-tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.ldr-info-icon {
    color: var(--text-secondary);
    margin-left: 0.25rem;
    font-size: 0.875rem;
    cursor: help;
}

.ldr-info-icon:hover {
    color: var(--primary-color);
}

/* Page Information Section */
.ldr-page-info {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 3rem;
}

.ldr-page-info h3 {
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.ldr-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.ldr-info-section h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ldr-info-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ldr-info-section li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ldr-info-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.ldr-info-section strong {
    color: var(--text-primary);
}

.ldr-info-note {
    background: var(--bg-secondary);
    border-left: 3px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0.375rem;
    margin-top: 2rem;
}

.ldr-info-note p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.ldr-info-note strong {
    color: var(--text-primary);
}

/* Theme adjustments are now handled by CSS variables automatically */

@media (max-width: 768px) {
    .ldr-cost-header {
        flex-direction: column;
        align-items: stretch;
    }

    .ldr-time-range-selector {
        justify-content: center;
        flex-wrap: wrap;
    }

    .ldr-cost-grid {
        grid-template-columns: 1fr;
    }

    .ldr-cost-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
