/*
 * MSP Rapid Quote System
 * Main Stylesheet
 */

/* Import Google Fonts for cursive signatures */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');

:root {
    /* Color variables from requirements */
    --primary-blue: #063165;
    --light-gray: #b3b3b5;
    --accent-orange: #fb680d;
    --off-white: #f0eeed;
    --secondary-blue: #4c84b4;

    /* Additional colors for dark theme */
    --dark-bg: #121212;
    --dark-card: #1e1e1e; /* Lighter dark gray for cards */
    --stat-card-bg: #2a2a2a; /* Even lighter gray for stat cards */
    --dark-input: #2d2d2d;
    --success-green: #4CAF50;
    --error-red: #f44336;
}

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

body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--off-white);
    line-height: 1.6;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
}

/* Header */
header {
    background-color: var(--primary-blue);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo img {
    max-height: 60px;
    /* Removed margin-right since we're removing the text */
}

/* Hiding the h1 text but keeping it for SEO and accessibility */
.logo h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Main Content */
main {
    padding: 40px 0;
}

.card {
    background-color: var(--dark-card);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin-bottom: 30px;
}

.card-header {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 15px;
}

.card-header h2 {
    color: var(--accent-orange);
    font-size: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

/* Form row for side-by-side fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group.half-width {
    margin-bottom: 0;
}

/* Ensure form rows work on all screen sizes */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--off-white);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    background-color: var(--dark-input);
    color: var(--off-white);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--secondary-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 132, 180, 0.3);
}

/* Validation styles */
input.is-invalid {
    border-color: var(--error-red);
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.3);
}

input.is-valid {
    border-color: var(--success-green);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

/* Verification Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--dark-card);
    margin: 15% auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s;
}

.verification-type {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--primary-blue);
}

.verification-code-container {
    margin-bottom: 15px;
}

.close {
    color: var(--light-gray);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: var(--accent-orange);
}

.verification-code-container {
    margin: 20px 0;
}

#verification-code {
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-align: center;
}

.verification-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.verification-buttons button {
    flex: 0 0 48%;
}

#verify-code-btn {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
}

#resend-code-btn {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
}

/* Style for the continue button in verification modals */
.modal #continue-btn {
    background-color: var(--success-green);
    border-color: var(--success-green);
    margin-top: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.modal #continue-btn:hover {
    background-color: #3a9d3a;
    border-color: #3a9d3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Verification Status Icons */
.verification-icon {
    font-weight: bold;
    margin-left: 5px;
}

.verification-pending {
    animation: pulse 1.5s infinite;
}

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

/* Style for the continue button in service order form - with !important to override any other styles */
#quote-form #continue-btn,
button#continue-btn.btn.btn-primary,
.form-navigation #continue-btn {
    background-color: var(--accent-orange) !important;
    border-color: var(--accent-orange) !important;
    font-weight: bold;
    transition: all 0.3s ease;
    color: var(--off-white) !important;
}

#quote-form #continue-btn:hover,
button#continue-btn.btn.btn-primary:hover,
.form-navigation #continue-btn:hover {
    background-color: #e05c00 !important;
    border-color: #e05c00 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.success-message {
    padding: 10px;
    background-color: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
    border-left: 4px solid var(--success-green);
    margin-top: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Password input container styling */
.password-input-container {
    position: relative;
    display: flex;
    width: 100%;
}

.password-input-container input {
    flex: 1;
    padding-right: 40px; /* Make room for the icon */
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--light-gray);
    z-index: 10;
}

.password-toggle:hover {
    color: var(--accent-orange);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

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

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
}

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

/* Decision Makers Section */
.decision-makers-section {
    margin-top: 25px;
    padding: 20px;
    background-color: var(--stat-card-bg);
    border-radius: 6px;
    border-left: 4px solid var(--accent-orange);
}

.decision-makers-section h4 {
    color: var(--accent-orange);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.decision-makers-section .section-description {
    color: var(--light-gray);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.decision-maker-form {
    background-color: var(--dark-card);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #333;
    position: relative;
}

.decision-maker-form h5 {
    color: var(--off-white);
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.decision-maker-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.decision-maker-form .form-group {
    margin-bottom: 15px;
}

.remove-decision-maker-btn {
    background-color: var(--error-red);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s;
}

.remove-decision-maker-btn:hover {
    background-color: #d32f2f;
}

#add-decision-maker-btn {
    margin-top: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: var(--off-white);
}

.btn-primary:hover {
    background-color: #e05c00;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-blue);
    color: var(--off-white);
}

.btn-secondary:hover {
    background-color: #3a6d9a;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--light-gray);
    color: var(--off-white);
}

.btn-outline:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Multi-step Form */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* Progress Bar */
.progress-container {
    margin: 30px 0;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    background-color: var(--light-gray);
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-bg);
    font-weight: bold;
    margin-bottom: 8px;
}

.progress-step.active .step-circle {
    background-color: var(--accent-orange);
}

.progress-step.completed .step-circle {
    background-color: var(--success-green);
}

.step-text {
    font-size: 0.85rem;
    color: var(--light-gray);
}

.progress-step.active .step-text {
    color: var(--accent-orange);
}

.progress-step.completed .step-text {
    color: var(--success-green);
}

/* Quote Cards */
.quote-options, .service-order-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.quote-card, .service-order-card {
    background-color: var(--dark-card);
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
    max-height: 500px;
    overflow-y: auto;
    position: relative;
}

.quote-card:hover, .service-order-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-orange);
    box-shadow: 0 5px 15px rgba(251, 104, 13, 0.3);
}

.quote-card.selected, .service-order-card.selected {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px var(--accent-orange);
}

/* Cards are clickable but no overlay is shown - removed as per request */
.quote-card::after, .service-order-card::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
}

.quote-card:hover::after, .service-order-card:hover::after {
    opacity: 0 !important;
    display: none !important;
}

.quote-card-header, .service-order-card-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.quote-card-header h3, .service-order-card-header h3 {
    color: var(--accent-orange);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--off-white);
    margin: 15px 0;
}

.price-period {
    font-size: 0.9rem;
    color: var(--light-gray);
}

.quote-features, .service-order-features {
    margin: 20px 0;
}

.quote-features ul, .service-order-features ul {
    list-style-type: none;
}

.quote-features li, .service-order-features li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.quote-features li strong, .service-order-features li strong {
    color: var(--accent-orange);
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 5px;
}

.quote-features li:first-child strong, .service-order-features li:first-child strong {
    margin-top: 0;
}

.quote-features li::before, .service-order-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: bold;
}

/* Remove checkmark from section headers */
.quote-features li:first-child::before,
.quote-features li:nth-child(6)::before,
.quote-features li:nth-child(15)::before,
.service-order-features li:first-child::before,
.service-order-features li:nth-child(6)::before,
.service-order-features li:nth-child(15)::before {
    content: '';
}

.selection-instruction {
    color: var(--accent-orange);
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1.1rem;
}

.commitment-options {
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(251, 104, 13, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--accent-orange);
    animation: fadeIn 0.5s;
}

.commitment-options label {
    display: block;
    margin-bottom: 10px;
}

/* Service Order and Agreement Summary Styles */
.service-order-summary, .agreement-summary {
    margin-bottom: 30px;
}

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

.summary-section {
    background-color: var(--dark-input);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-section h4 {
    color: var(--accent-orange);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.info-table, .pricing-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td, .pricing-table td {
    padding: 8px 5px;
    border-bottom: 1px solid rgba(179, 179, 181, 0.2);
}

.info-table tr:last-child td, .pricing-table tr:last-child td {
    border-bottom: none;
}

.pricing-section {
    background-color: var(--dark-input);
}

.price-value {
    text-align: right;
    font-weight: 500;
}

.total-row {
    font-weight: bold;
    border-top: 2px solid var(--light-gray);
}

.total-row td {
    padding-top: 12px;
}

.setup-fee-row {
    color: var(--accent-orange);
}

.discount-row {
    color: var(--success-green);
}

/* Signature Pad */
.signature-container {
    margin: 30px 0;
    background-color: var(--dark-input);
    padding: 20px;
    border-radius: 8px;
}

.signature-pad {
    border: 2px dashed var(--light-gray);
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: #fff;
}

.signature-pad-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Signature Type Selection */
.signature-type-selector {
    margin-bottom: 20px;
    display: none; /* Hide radio buttons - only typing method available */
}

.signature-type-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.signature-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--off-white);
    font-size: 16px;
}

.signature-type-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.signature-type-option span {
    cursor: pointer;
}

/* Typed Signature Input */
.typed-signature-container {
    display: none;
}

.typed-signature-container.active {
    display: block;
}

.typed-signature-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid var(--light-gray);
    border-radius: 4px;
    background-color: #fff;
    color: #000;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    text-align: left;
}

.typed-signature-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.typed-signature-preview {
    margin-top: 15px;
    padding: 20px;
    background-color: #fff;
    border: 2px dashed var(--light-gray);
    border-radius: 4px;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typed-signature-text {
    font-family: "Dancing Script", "Brush Script MT", "Lucida Handwriting", "Times New Roman", serif;
    font-size: 32px;
    color: #000;
    font-weight: normal;
    font-style: italic;
}

.typed-signature-placeholder {
    color: #999;
    font-style: italic;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

/* Drawn Signature Container */
.drawn-signature-container {
    display: none; /* Hidden by default since typed is default */
}

.drawn-signature-container.active {
    display: block;
}

/* Signature Display Styles */
.signature-display {
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
}

.signature-display img {
    max-width: 100%;
    height: auto;
}

.signature-display .typed-signature {
    font-family: "Dancing Script", "Brush Script MT", "Lucida Handwriting", "Times New Roman", serif;
    font-size: 32px;
    color: #000;
    text-align: center;
    padding: 20px;
    margin: 0;
    font-weight: normal;
    font-style: italic;
    line-height: 1.2;
}

/* Additional styling for typed signatures in all contexts - PDF-safe fonts */
.typed-signature {
    font-family: "Dancing Script", "Brush Script MT", "Lucida Handwriting", "Times New Roman", serif !important;
    font-size: 32px !important;
    color: #000 !important;
    text-align: center !important;
    padding: 20px !important;
    margin: 0 !important;
    font-weight: normal !important;
    font-style: italic !important;
    line-height: 1.2 !important;
    /* Additional PDF compatibility properties */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* PDF-specific styling for better conversion */
@media print {
    .typed-signature {
        font-family: "Dancing Script", "Brush Script MT", "Lucida Handwriting", "Times New Roman", serif !important;
        font-style: italic !important;
        font-weight: normal !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Admin Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--stat-card-bg);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--light-gray);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    color: var(--light-gray);
    font-size: 0.9rem;
}

.quotes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.quotes-table th,
.quotes-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
    position: relative;
}

.quotes-table th {
    background-color: var(--primary-blue);
    color: var(--off-white);
}

.quotes-table tr:hover {
    background-color: rgba(76, 132, 180, 0.1);
}

.quotes-table-container {
    position: relative;
    overflow: visible !important;
}

/* Ensure dropdown menus don't cause scrollbars */
.dropdown {
    position: relative;
    z-index: 500;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    overflow: visible;
    max-height: none;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--success-green);
    color: var(--success-green);
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid var(--error-red);
    color: var(--error-red);
}

/* Footer */
footer {
    background-color: var(--primary-blue);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

.footer-content {
    color: var(--off-white);
    font-size: 0.9rem;
}

/* Collapsible Agreement */
.collapsible {
    margin-bottom: 20px;
    background-color: var(--dark-input);
    border-radius: 8px;
    overflow: hidden;
}

.collapsible-header {
    padding: 15px 20px;
    background-color: var(--primary-blue);
    color: var(--off-white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.collapsible-header:hover {
    background-color: var(--secondary-blue);
}

.collapsible-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.collapsible-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.collapsible-content {
    max-height: 0;
    overflow: auto;
    transition: max-height 0.5s ease;
    background-color: var(--dark-input);
}

.collapsible.active .collapsible-toggle {
    transform: rotate(180deg);
}

.collapsible.active .collapsible-content {
    max-height: 2000px; /* Significantly increased height to accommodate the full agreement */
}

/* Special case for view_signed_service_order.php */
body.service-order-view .collapsible.active .collapsible-content {
    max-height: none; /* No height limit for service order view */
    overflow: visible; /* Remove scroll bar */
}

/* Ensure the agreement is fully visible */
body.service-order-view .agreement-markdown {
    max-height: none;
    overflow: visible;
}

.agreement-markdown {
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Smaller font size for signed service order view to fix PDF size issue */
body.service-order-view .agreement-markdown {
    font-size: 0.7rem;
    line-height: 1.4; /* Reduce line height to make content more compact */
    padding: 15px; /* Reduce padding to make content more compact */
}

.agreement-markdown h1,
.agreement-markdown h2 {
    color: var(--accent-orange);
    margin-top: 20px;
    margin-bottom: 10px;
}

.agreement-markdown h1 {
    font-size: 1.5rem;
}

.agreement-markdown h2 {
    font-size: 1.3rem;
}

.agreement-markdown h3,
.agreement-markdown h4 {
    color: var(--off-white);
    margin-top: 15px;
    margin-bottom: 8px;
}

.agreement-markdown h3 {
    font-size: 1.1rem;
}

.agreement-markdown h4 {
    font-size: 1rem;
}

/* Smaller heading sizes for service order view */
body.service-order-view .agreement-markdown h1 {
    font-size: 1.3rem;
}

body.service-order-view .agreement-markdown h2 {
    font-size: 1.1rem;
}

body.service-order-view .agreement-markdown h3 {
    font-size: 0.95rem;
}

body.service-order-view .agreement-markdown h4 {
    font-size: 0.85rem;
}

.agreement-markdown p,
.agreement-markdown ul,
.agreement-markdown ol {
    margin-bottom: 10px;
}

.agreement-markdown ul,
.agreement-markdown ol {
    padding-left: 20px;
}

.agreement-markdown strong {
    color: var(--accent-orange);
}

/* Print Styles */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .card {
        background-color: white;
        box-shadow: none;
        padding: 0;
    }

    .collapsible {
        background-color: white;
        page-break-inside: avoid;
    }

    .collapsible-header {
        background-color: white;
        color: black;
        cursor: default;
    }

    .collapsible-content {
        max-height: none !important;
        overflow: visible !important;
        background-color: white;
        display: block !important;
    }

    .agreement-markdown {
        color: black;
        font-size: 0.7rem; /* Keep the smaller font size for PDF/print */
        line-height: 1.4; /* Reduce line height to make content more compact */
    }

    .agreement-markdown h1,
    .agreement-markdown h2,
    .agreement-markdown h3,
    .agreement-markdown h4 {
        color: black;
    }

    /* Smaller heading sizes for print */
    .agreement-markdown h1 {
        font-size: 1.3rem;
    }

    .agreement-markdown h2 {
        font-size: 1.1rem;
    }

    .agreement-markdown h3 {
        font-size: 0.95rem;
    }

    .agreement-markdown h4 {
        font-size: 0.85rem;
    }

    .agreement-markdown strong {
        color: black;
    }

    .summary-section {
        background-color: white;
        color: black;
    }

    .btn, footer {
        display: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .quote-options, .service-order-options {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }

    .progress-bar {
        max-width: 100%;
    }

    .step-text {
        display: none;
    }

    .quote-card, .service-order-card {
        max-height: 400px;
    }

    .collapsible.active .collapsible-content {
        max-height: 300px; /* Smaller height for mobile */
    }

    /* Ensure service order view has no height limit even on mobile */
    body.service-order-view .collapsible.active .collapsible-content {
        max-height: none !important;
        overflow: visible !important;
    }
}
