/**
 * ProximaOps Pricing Calculator - Styles
 */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Loading Animation */
.loading {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Range Input Styling */
input[type="range"] {
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

/* Layout - Calculator-only mode (sidebar removed) */
.sidebar {
    display: none; /* Hidden in calculator-only mode */
}

.main-content {
    margin-left: 0;
    width: 100%;
    min-height: 100vh;
}

/* Navigation */
.nav-item {
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: #f3f4f6;
}

.nav-item.active {
    background: #eff6ff;
    color: #3b82f6;
    border-left: 3px solid #3b82f6;
}

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

.tooltip-container .tooltip-text {
    visibility: hidden;
    width: 340px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #fff;
    text-align: left;
    border-radius: 12px;
    padding: 0;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -170px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    line-height: 1.6;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
}

.tooltip-header {
    background: rgba(255,255,255,0.15);
    padding: 12px 16px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.tooltip-body {
    padding: 16px;
}

.tooltip-formula {
    background: rgba(0,0,0,0.2);
    padding: 10px 12px;
    border-radius: 6px;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    border-left: 3px solid #60a5fa;
}

.tooltip-calculation {
    background: rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid rgba(255,255,255,0.15);
}

.tooltip-breakdown {
    margin: 12px 0 8px 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.tooltip-footer {
    background: rgba(0,0,0,0.15);
    padding: 10px 16px;
    border-radius: 0 0 12px 12px;
    font-size: 11px;
    color: #93c5fd;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.calc-label {
    color: #bfdbfe;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 500;
}

.calc-value {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.tooltip-container .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    margin-left: 4px;
}

/* Print Styles for PDF Export */
@media print {
    /* Hide UI elements */
    .sidebar,
    .nav-item,
    button,
    input[type="range"],
    input[type="number"],
    input[type="date"],
    select,
    .tooltip-container .tooltip-text,
    .info-icon,
    #section-overhead,
    #section-teams,
    #section-projects,
    #section-employees {
        display: none !important;
    }

    /* Full width for content */
    .main-content {
        margin-left: 0 !important;
        max-width: 100% !important;
    }

    /* Show only calculator section */
    #section-calculator {
        display: block !important;
    }

    /* Page setup */
    body {
        background: white;
        margin: 0;
        padding: 20px;
    }

    /* Prevent page breaks inside cards */
    .bg-white {
        page-break-inside: avoid;
    }

    /* Adjust grid for print */
    .grid {
        gap: 10px !important;
    }

    /* Make text darker for print */
    .text-gray-600 {
        color: #4b5563 !important;
    }

    .text-gray-700 {
        color: #374151 !important;
    }

    /* Remove shadows and borders */
    .rounded-xl {
        box-shadow: none !important;
    }

    /* Add page header */
    #section-calculator::before {
        content: "ProximaOps - Pricing Quote";
        display: block;
        font-size: 24px;
        font-weight: bold;
        color: #1f2937;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #3b82f6;
    }

    /* Add timestamp */
    #section-calculator::after {
        content: "Generated: " attr(data-timestamp);
        display: block;
        font-size: 10px;
        color: #6b7280;
        margin-top: 20px;
        text-align: right;
    }
}

/* Print mode class (applied by JS) */
body.print-mode .sidebar,
body.print-mode button,
body.print-mode .billing-mode-selector,
body.print-mode input,
body.print-mode select {
    display: none !important;
}

body.print-mode .main-content {
    margin-left: 0;
}
