/**
 * Tactus AI Financial Model - Custom Styles
 */

/* Hide elements with x-cloak until Alpine initializes */
[x-cloak] { display: none !important; }

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Field saving animation */
.field-saving {
    animation: pulse-save 0.5s ease-in-out;
}
@keyframes pulse-save {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgb(187, 247, 208); }
}

/* Product tabs styling */
.product-tab {
    transition: all 0.2s ease;
}
.product-tab.active {
    border-bottom: 2px solid #2F5496;
    color: #2F5496;
}
.product-tab:hover:not(.active) {
    background-color: #f3f4f6;
}

/* Product disabled overlay */
.product-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Schedule grid styling */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
@media (min-width: 768px) {
    .schedule-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}
@media (min-width: 1024px) {
    .schedule-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

/* Escalation card styling */
.escalation-card {
    transition: box-shadow 0.2s ease;
}
.escalation-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Headcount table styling */
.headcount-table th {
    position: sticky;
    top: 0;
    background: #f9fafb;
    z-index: 10;
}

/* Benefits override indicator */
.benefits-override {
    position: relative;
}
.benefits-override::after {
    content: '*';
    color: #2F5496;
    position: absolute;
    top: -2px;
    right: -8px;
    font-size: 12px;
}

/* Hiring triggers panel */
.hiring-trigger-card {
    border-left: 3px solid #2F5496;
}

/* Toast notification animations */
.toast-enter {
    animation: toast-in 0.3s ease-out;
}
.toast-leave {
    animation: toast-out 0.3s ease-in;
}
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(1rem);
    }
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(2px);
}

/* Section cards */
.section-card {
    transition: box-shadow 0.2s ease;
}
.section-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Sidebar navigation */
.sidebar-nav-item {
    transition: all 0.15s ease;
}
.sidebar-nav-item:hover {
    transform: translateX(2px);
}

/* Chart container styling */
.chart-container {
    position: relative;
    min-height: 250px;
}

/* Results table alternating rows */
.results-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Contractor badge */
.contractor-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #fef3c7;
    color: #92400e;
    border-radius: 9999px;
}

/* Employee badge */
.employee-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #dbeafe;
    color: #1e40af;
    border-radius: 9999px;
}

/* Planned hire badge */
.planned-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #e0e7ff;
    color: #3730a3;
    border-radius: 9999px;
}

/* Form input focus ring */
.input-focus:focus {
    outline: none;
    ring: 2px;
    ring-color: #2F5496;
    border-color: transparent;
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Scrollbar styling */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Product icon styling */
.product-icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* Toggle switch styling */
.toggle-switch {
    position: relative;
    width: 2.5rem;
    height: 1.25rem;
    background-color: #d1d5db;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}
.toggle-switch.active {
    background-color: #2F5496;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    background-color: white;
    border-radius: 9999px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.toggle-switch.active::after {
    transform: translateX(1.25rem);
}
