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

body {
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 210mm;
    margin: 0 auto;
    background: white;
    padding: 15mm;
}

h1 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
}

h2 {
    font-size: 14px;
    font-weight: bold;
    margin: 15px 0 10px 0;
    text-align: center;
}

.header-controls {
    margin-bottom: 15px;
    text-align: right;
}

.print-btn, .export-btn, .copy-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 0 5px;
}

.export-btn {
    background: #28a745;
}

.copy-btn {
    background: #ffc107;
    color: #212529;
}

.print-btn:hover {
    background: #0056b3;
}

.export-btn:hover {
    background: #218838;
}

.copy-btn:hover {
    background: #e0a800;
}

.notice {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.form-section {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    align-items: center;
}

.form-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group label {
    font-weight: normal;
    white-space: nowrap;
}

.form-group label.wrap-text {
    white-space: normal;
    word-wrap: break-word;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"] {
    border: none;
    border-bottom: 1px solid #333;
    background: transparent;
    padding: 2px 5px;
    font-size: 12px;
    min-width: 80px;
}

.longer-input {
    min-width: 300px !important;
    width: 300px;
}

.unit {
    font-weight: normal;
    margin-left: 3px;
}

.checkbox-group {
    display: flex;
    gap: 15px;
}

.checkbox-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 3px;
}

.comparison-section {
    margin: 15px 0;
    display: flex;
    gap: 20px;
}

.measurement-table {
    flex: 1;
    border: 1px solid #333;
    padding: 15px;
}

.measurement-table h3 {
    background: #f0f0f0;
    margin: -15px -15px 15px -15px;
    padding: 12px 15px;
    font-weight: bold;
    text-align: center;
    font-size: 14px;
    border-bottom: 1px solid #333;
}

.measurement-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.measurement-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
}

.measurement-group input {
    border: none;
    border-bottom: 1px solid #333;
    background: transparent;
    padding: 1px 3px;
    font-size: 11px;
    width: 50px;
}

.bagshot-section {
    margin-top: 10px;
}

.bagshot-inputs {
    margin: 5px 0;
}

.bagshot-inputs label {
    display: block;
    margin: 3px 0;
    font-size: 11px;
}

.bagshot-inputs input {
    width: 80px;
}

.bagshot-section textarea {
    width: 100%;
    border: 1px solid #333;
    padding: 3px;
    font-size: 11px;
    resize: none;
    margin: 3px 0;
}

.photo-reminder {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 8px;
    margin-top: 5px;
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
}

.checklist {
    margin-top: 10px;
}

.checklist label {
    display: block;
    margin: 5px 0;
    font-size: 12px;
}

.checklist input[type="checkbox"] {
    margin-right: 8px;
}

.dual-checklist {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.checklist-section {
    flex: 1;
    border: 1px solid #333;
}

.checklist-section h3 {
    background: #f0f0f0;
    margin: 0;
    padding: 8px;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    border-bottom: 1px solid #333;
}

.checklist-section .checklist {
    padding: 10px;
    margin: 0;
}

.media-content {
    padding: 10px;
}

.media-section {
    margin-bottom: 8px;
}

.media-section:last-child {
    margin-bottom: 0;
}

.media-section strong {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 3px;
}

.media-item {
    margin: 2px 0 2px 20px;
    font-size: 12px;
}

.final-reminder {
    text-align: center;
    margin: 20px 0 10px 0;
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }
    
    body {
        background: white;
        font-size: 10px;
        line-height: 1.2;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .no-print {
        display: none;
    }
    
    h1 {
        font-size: 14px;
        margin-bottom: 5px;
        text-align: center;
    }
    
    h2 {
        background: #f0f0f0;
        margin: 0 0 4px 0;
        padding: 4px 8px;
        font-size: 12px;
        font-weight: bold;
        text-align: center;
        border-bottom: 1px solid #333;
        color: #333;
    }
    
    .form-section {
        background: white;
        border: 1px solid #333;
        margin-bottom: 4px;
        padding: 0;
    }
    
    .form-section .form-row {
        padding: 4px 8px;
        margin-bottom: 0;
        gap: 4px;
    }
    
    .form-section .form-row:not(:last-child) {
        border-bottom: 1px solid #eee;
        padding-bottom: 4px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="number"],
    .form-group input[type="date"] {
        font-size: 10px;
        min-width: 50px;
        padding: 1px 3px;
        appearance: textfield;
    }
    
    .form-group label {
        font-size: 10px;
        font-weight: normal;
    }
    
    /* Remove number input arrows */
    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    
    input[type="number"] {
        appearance: textfield;
    }
    
    .longer-input {
        min-width: 220px !important;
        width: 220px;
        font-size: 10px;
    }
    
    .unit {
        font-size: 10px;
    }
    
    .comparison-section {
        margin: 4px 0;
        display: flex;
        gap: 4px;
    }
    
    .measurement-table {
        flex: 1;
        border: 1px solid #333;
        padding: 0;
    }
    
    .measurement-table h3 {
        background: #f0f0f0;
        margin: 0;
        padding: 4px 8px;
        font-weight: bold;
        text-align: center;
        font-size: 12px;
        border-bottom: 1px solid #333;
    }
    
    .measurement-table .measurement-group {
        padding: 4px;
    }
    
    .measurement-group label {
        font-size: 10px;
        font-weight: normal;
    }
    
    .measurement-group input {
        font-size: 10px;
        width: 40px;
        padding: 1px 2px;
        appearance: textfield;
    }
    
    .measurement-table .bagshot-section {
        padding: 4px;
        background: white;
        border-top: 1px solid #eee;
    }
    
    .bagshot-inputs label,
    .bagshot-section textarea {
        font-size: 10px;
    }
    
    .bagshot-section strong {
        font-size: 10px;
        font-weight: bold;
    }
    
    .bagshot-inputs input {
        width: 60px;
        font-size: 10px;
        padding: 1px 2px;
        appearance: textfield;
    }
    
    .checklist-section {
        background: white;
        border: 1px solid #333;
        margin-bottom: 4px;
    }
    
    .checklist-section h3 {
        background: #f0f0f0;
        color: #333;
        font-size: 12px;
        font-weight: bold;
        padding: 4px 8px;
        margin: 0;
        border-bottom: 1px solid #333;
        text-align: center;
    }
    
    .checklist-section .checklist {
        padding: 4px;
        margin: 0;
    }
    
    .media-content {
        padding: 4px;
    }
    
    .media-section strong {
        font-size: 10px;
        font-weight: bold;
    }
    
    .media-item {
        font-size: 10px;
        margin: 1px 0 1px 15px;
    }
    
.photo-reminder {
        font-size: 10px;
        padding: 2px;
        margin: 2px 0;
    }
    
    .checklist label {
        font-size: 10px;
        margin: 1px 0;
        font-weight: normal;
        line-height: 1.2;
    }
    
    .page-break {
        page-break-before: always;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: 14px;
        zoom: 1.25;
    }

    h2, h3 {
        font-size: 16px;
    }

    .container {
        max-width: 100%;
        padding: 10px;
    }

    .form-row,
    .comparison-section,
    .dual-checklist,
    .measurement-table,
    .checklist-section {
        display: block;
    }

    .form-group {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
    }

    .form-group-column {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group label {
        white-space: nowrap;
        margin-right: 10px;
    }

    .form-group input[type="text"],
    .form-group input[type="number"],
    .form-group input[type="date"] {
        flex-grow: 1;
        width: auto; /* Overwrite the 100% width */
    }

    .header-controls {
        display: flex;
        gap: 10px;
    }

    .header-controls button {
        flex: 1;
    }

    .bagshot-section textarea,
    .measurement-group input {
        width: 100%;
    }

    .longer-input {
        flex: 1;
        min-width: 0 !important;
        width: auto !important;
    }

    .measurement-group label {
        white-space: nowrap;
    }

    .bagshot-inputs label {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-bottom: 10px;
        white-space: nowrap;
    }

    .bagshot-inputs input {
        flex: 1;
    }

    .bagshot-section > label:last-of-type {
        display: flex;
        align-items: center;
    }

    .bagshot-section > label:last-of-type input {
        flex-grow: 1;
        margin: 0 5px;
    }

    .checkbox-group {
        flex-basis: 100%;
        margin-top: 5px;
    }
}

.footer {
    text-align: center;
    margin-top: 10px;
    font-size: 8px;
    color: #666;
}

/* Footer is now the same in web and print view */

@media screen and (max-width: 768px) {
    .footer {
        font-size: 12px;
        margin-top: 15px;
    }

    input[type="text"],
    input[type="number"],
    input[type="date"],
    textarea {
        font-size: 16px !important;
    }
}