/* Assured Shorthold Tenancy Agreement Styles */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Dancing+Script:wght@500;600;700&display=swap');

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

body {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #000;
    background: #f5f5f5;
}

.ast-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 40px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
}

/* BACK LINK */
.back-link {
    display: inline-block;
    margin-bottom: 25px;
    padding: 10px 20px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    border-radius: 5px;
    transition: background 0.2s;
}

.back-link:hover {
    background: #333;
}

/* DOCUMENT TITLE */
.ast-title {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #000;
}

.ast-title h1 {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: clamp(28px, 8vw, 40px);
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.ast-title h2 {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: clamp(14px, 4vw, 18px);
    letter-spacing: 1px;
    font-weight: normal;
    margin-bottom: 10px;
}

.ast-title p {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

/* GUIDANCE NOTES BANNER */
.guidance-banner {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-left: 4px solid #1a1a1a;
    padding: 15px 20px;
    margin-bottom: 30px;
    font-size: 12px;
    line-height: 1.5;
}

.guidance-banner strong {
    display: block;
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* SUMMARY BOX */
.summary-box {
    border: 2px solid #000;
    margin-bottom: 30px;
}

.summary-box-header {
    background: #1a1a1a;
    color: #fff;
    padding: 12px 20px;
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
}

.summary-box-body {
    padding: 20px;
}

.summary-row {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    min-width: 180px;
    padding-right: 15px;
    color: #666;
}

.summary-value {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
    min-width: 200px;
}

/* SECTION HEADERS */
.section-header {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: clamp(16px, 4vw, 20px);
    letter-spacing: 2px;
    margin: 35px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #000;
}

.sub-header {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    margin: 20px 0 10px 0;
    color: #333;
}

/* DEFINITIONS */
.definition-list {
    margin-bottom: 25px;
}

.definition-item {
    margin-bottom: 12px;
    padding-left: 15px;
    border-left: 2px solid #ddd;
}

.definition-term {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 3px;
}

.definition-desc {
    font-size: 12px;
    color: #333;
}

/* CLAUSES */
.clause {
    margin-bottom: 15px;
}

.clause-number {
    font-weight: 700;
    margin-right: 5px;
}

.clause p, .clause-text {
    font-size: 12.5px;
    margin-bottom: 8px;
    text-align: justify;
}

.clause ul {
    font-size: 12.5px;
    margin: 8px 0 8px 25px;
}

.clause li {
    margin-bottom: 6px;
}

.clause-group {
    margin-bottom: 25px;
}

.clause-group-title {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 13px;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
    color: #333;
}

/* MAIN AGREEMENT SECTION */
.agreement-parties {
    margin-bottom: 25px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 3px;
}

.agreement-parties p {
    margin-bottom: 8px;
    font-size: 13px;
}

.party-label {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #666;
    display: block;
    margin-bottom: 3px;
}

.party-value {
    font-weight: 600;
}

/* RENT BOX */
.rent-box {
    border: 2px solid #000;
    padding: 15px 20px;
    margin: 15px 0;
    background: #fafafa;
}

.rent-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    margin: 8px 0;
    gap: 10px;
}

.rent-label {
    font-size: 12px;
    min-width: 200px;
}

.rent-value {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: clamp(20px, 5vw, 26px);
    letter-spacing: 1px;
}

.rent-period {
    font-size: 12px;
    margin-left: 5px;
}

/* BANK DETAILS */
.bank-details {
    border: 1px solid #000;
    padding: 15px 20px;
    margin: 15px 0;
    background: #f9f9f9;
}

.bank-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 5px 0;
}

.bank-label {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 11px;
    letter-spacing: 0.5px;
    min-width: 140px;
    color: #666;
}

.bank-value {
    font-weight: 600;
    font-size: 13px;
}

/* CHARGES TABLE */
.charges-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 15px 0;
}

.charges-table th {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 11px;
    letter-spacing: 0.5px;
    background: #1a1a1a;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
}

.charges-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
}

/* PAYMENT SCHEDULE */
.payment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 15px 0;
}

.payment-table th {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 11px;
    letter-spacing: 0.5px;
    background: #1a1a1a;
    color: #fff;
    padding: 10px 15px;
    text-align: left;
}

.payment-table td {
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
}

.payment-table tr:last-child td {
    border-top: 2px solid #000;
    font-weight: 700;
}

/* SIGNATURE SECTION */
.signature-section {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 2px solid #000;
}

.signature-intro {
    font-size: 13px;
    margin-bottom: 15px;
    font-weight: 600;
}

.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.signature-box {
    margin-bottom: 20px;
}

.signature-box .sig-label {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 8px;
}

.signature-line {
    border-bottom: 1px solid #000;
    min-height: 40px;
    padding: 5px 0;
}

.signature-text {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 600;
}

.date-text {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(14px, 4vw, 18px);
    font-weight: 500;
}

/* DEPOSIT PROTECTION */
.dps-section {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 2px solid #000;
}

.dps-address {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 12px 15px;
    margin: 10px 0;
    font-size: 12px;
    line-height: 1.6;
}

/* IMPORTANT NOTICE */
.important-notice {
    border: 2px solid #000;
    background: #fff8e1;
    padding: 12px 20px;
    margin: 15px 0;
    text-align: center;
}

.important-notice strong {
    font-size: 12px;
}

/* PAGE BREAK */
.page-break {
    page-break-before: always;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #000;
}

/* SUPPORTING DOCS */
.docs-checklist {
    list-style: none;
    padding: 0;
}

.docs-checklist li {
    padding: 8px 0 8px 30px;
    border-bottom: 1px solid #eee;
    position: relative;
    font-size: 12px;
}

.docs-checklist li::before {
    content: '☐';
    position: absolute;
    left: 5px;
    font-size: 16px;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .ast-container {
        padding: 15px;
        margin: 10px;
        border-radius: 0;
    }

    .summary-row {
        flex-direction: column;
    }

    .summary-label {
        min-width: 100%;
        margin-bottom: 3px;
    }

    .rent-label {
        min-width: 100%;
    }

    .signature-grid {
        grid-template-columns: 1fr;
    }

    .bank-row {
        flex-direction: column;
    }
}

/* PRINT STYLES */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    @page {
        size: A4;
        margin: 15mm 12mm;
    }

    body {
        font-size: 10pt;
        background: white;
    }

    .back-link,
    .no-print {
        display: none !important;
    }

    .ast-container {
        max-width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .ast-title h1 {
        font-size: 32pt;
    }

    .ast-title h2 {
        font-size: 13pt;
    }

    .summary-box-header {
        background: #1a1a1a !important;
        color: #fff !important;
    }

    .charges-table th,
    .payment-table th {
        background: #1a1a1a !important;
        color: #fff !important;
    }

    .section-header {
        font-size: 16pt;
        page-break-after: avoid;
    }

    .sub-header {
        page-break-after: avoid;
    }

    .clause {
        orphans: 3;
        widows: 3;
    }

    .clause p {
        font-size: 9.5pt;
    }

    .summary-row {
        page-break-inside: avoid;
    }

    .rent-box,
    .bank-details {
        page-break-inside: avoid;
    }

    .signature-section {
        page-break-inside: avoid;
    }

    .page-break {
        page-break-before: always;
        margin-top: 0;
        padding-top: 15px;
    }

    .guidance-banner {
        page-break-inside: avoid;
    }

    .definition-item {
        page-break-inside: avoid;
    }

    .dps-section {
        page-break-before: always;
    }

    .signature-text {
        font-size: 18pt;
    }

    .date-text {
        font-size: 14pt;
    }
}
