/* Brand Colors */
:root {
    --brand-green: #006C48;
    --brand-green-light: #00895c;
    --brand-green-dark: #004d33;
}

/* Target row highlighting in results table */
.target-row {
    background-color: #fef9c3 !important; /* yellow-100 */
    border-left: 3px solid #ca8a04 !important; /* yellow-600 */
}

/* Print Styles */
@page {
    margin: 0.25in;
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        font-size: 11px;
    }

    .print-header {
        display: block !important;
        padding-bottom: 2px !important;
        margin-bottom: 2px !important;
    }

    /* Smaller print header logo */
    .print-header img {
        height: 32px !important;
        width: 32px !important;
    }

    .print-header h1 {
        font-size: 16px !important;
    }

    .print-header p {
        font-size: 10px !important;
    }

    #results-card {
        box-shadow: none !important;
        border: none !important;
        padding: 8px !important;
    }

    .shadow-md, .shadow-lg {
        box-shadow: none !important;
    }

    header {
        display: none !important;
    }

    footer {
        display: none !important;
    }

    main {
        padding: 0 !important;
    }

    .lg\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* Compact patient summary */
    .bg-gray-50.rounded-md.p-4 {
        padding: 4px 8px !important;
        margin-bottom: 3px !important;
    }

    /* Tighter grid gaps in patient summary */
    .grid.grid-cols-3 {
        gap: 0px 10px !important;
    }

    /* Compact eye indicator */
    .border-l-4.border-brand-400 {
        padding: 4px 8px !important;
        margin-top: 12px !important;
        margin-bottom: 10px !important;
    }

    .border-l-4.border-brand-400 span {
        font-size: 11px !important;
    }

    /* Compact formula sections */
    .mb-6 {
        margin-bottom: 12px !important;
    }

    /* Smaller formula headings */
    h3.text-lg {
        font-size: 11px !important;
        margin-bottom: 1px !important;
    }

    /* Compact table rows */
    table th, table td {
        padding: 1px 4px !important;
    }

    /* Smaller table header */
    thead.bg-brand-50 th {
        font-size: 9px !important;
    }

    /* Compact patient header */
    .font-bold.text-lg.text-gray-800 {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }

    /* Reduce text sizes in patient data grid */
    .text-sm {
        font-size: 10px !important;
    }

    /* Separator margins */
    .border-t.border-gray-200.my-2 {
        margin: 2px 0 !important;
    }

    /* Ultrasound note */
    .mt-3.pt-2.border-t {
        margin-top: 4px !important;
        padding-top: 2px !important;
        font-size: 9px !important;
    }
}

/* Form focus states */
input:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--brand-green);
}

/* Fix iOS form controls grey background */
input[type="date"],
select {
    background-color: white;
    -webkit-appearance: none;
    appearance: none;
}

/* Prevent iOS date inputs from collapsing when empty */
input[type="date"] {
    min-height: 42px;
}

/* Custom dropdown arrow for selects */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Loading state for calculate button */
.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Better table styling */
table {
    border-collapse: collapse;
}

table th, table td {
    border-bottom: 1px solid #e5e7eb;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile horizontal scroll hint - subtle fade on right edge */
@media (max-width: 640px) {
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
}

/* Horizontal scroll hint - gradient fade on right edge */
.scroll-hint {
    position: relative;
}

.scroll-hint::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    background: linear-gradient(to right, transparent, white);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.scroll-hint.scrolled-end::after {
    opacity: 0;
}

/* Hide hint on desktop where scrolling isn't needed */
@media (min-width: 1024px) {
    .scroll-hint::after {
        display: none;
    }
}

/* Contact Modal Animation */
#contactModal:not(.hidden) > div:last-child > div {
    animation: modalIn 0.15s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
