/* 
    STYLE DIALOGUE - PDF EXPORT STYLES
    Portrait A4 Layouts using Canela and Inter
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* Fallback for Canela if not loaded locally */
@font-face {
    font-family: 'Canela';
    src: local('Canela'), local('Georgia'), serif;
}

#pdfGenerationContainer {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 210mm;
    background: white;
}

.pdf-page {
    width: 210mm;
    height: 297mm;
    background: #F5F3EE;
    position: relative;
    overflow: hidden;
    page-break-after: always;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    color: #1E1E1E;
}

.pdf-page.dark-mode {
    background: #2A3D33;
    color: #F5F3EE;
}

/* Base Typography */
.pdf-page h1, .pdf-page h2, .pdf-page h3, .pdf-page h4 {
    font-family: 'Canela', Georgia, serif;
    font-weight: normal;
    margin: 0;
}

/* 1. Cover Page */
.pdf-cover {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20mm;
}
.pdf-cover-logo {
    font-size: 36px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    position: absolute;
    top: 40mm;
    font-family: 'Canela', Georgia, serif;
}
.pdf-cover-project {
    font-size: 72px;
    font-weight: 500;
    color: #F5F3EE;
    margin-top: 60mm;
    margin-bottom: 5mm;
    line-height: 1.1;
    font-family: 'Canela', Georgia, serif;
}
.pdf-cover-subtitle {
    font-size: 14px;
    font-style: italic;
    font-weight: 300;
    color: rgba(245, 243, 238, 0.8);
    margin-bottom: 10mm;
    border: none;
}
.pdf-cover-edition {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(245, 243, 238, 0.6);
}
.pdf-cover-designer {
    position: absolute;
    bottom: 30mm;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: rgba(245, 243, 238, 0.8);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 1.5 Room Intro Page */
.pdf-intro-page {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    padding: 0;
}
.pdf-intro-content {
    position: absolute;
    top: 40mm;
    text-align: center;
    width: 100%;
    padding: 0 30mm;
}
.pdf-intro-title {
    font-size: 48px;
    margin-bottom: 15mm;
    letter-spacing: 0.05em;
}
.pdf-intro-quote {
    font-size: 14px;
    font-style: italic;
    line-height: 1.8;
    color: #444;
    max-width: 120mm;
    margin: 0 auto;
}
.pdf-intro-image {
    width: 100%;
    height: 180mm;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 2. Philosophy & Intent Pages */
.pdf-text-page {
    padding: 30mm 40mm;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.pdf-text-page h2 {
    font-size: 32px;
    margin-bottom: 15mm;
    color: #2A3D33;
}
.pdf-text-page p {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
}
.pdf-text-page .quote {
    font-size: 28px;
    font-family: 'Canela', Georgia, serif;
    line-height: 1.4;
    color: #2A3D33;
    margin-bottom: 15mm;
}

/* 3. Setting Page */
.pdf-setting {
    padding: 30mm 20mm;
}
.pdf-setting-header {
    margin-bottom: 20mm;
}
.pdf-setting-header h3 {
    font-size: 14px;
    color: #C1A265;
    font-family: 'Inter', sans-serif;
    font-style: italic;
    margin-bottom: 5mm;
}
.pdf-setting-header h1 {
    font-size: 42px;
    color: #F5F3EE;
}
.pdf-setting-content {
    display: flex;
    gap: 15mm;
}
.pdf-setting-content p {
    flex: 1;
    font-size: 12px;
    line-height: 1.8;
    color: #F5F3EE;
    opacity: 0.9;
}

/* 4. Room Chapter Page */
.pdf-chapter {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40mm;
}
.pdf-chapter h3 {
    font-size: 14px;
    color: #C1A265;
    font-family: 'Inter', sans-serif;
    font-style: italic;
    margin-bottom: 5mm;
}
.pdf-chapter h1 {
    font-size: 54px;
}
.pdf-chapter p {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 10mm;
    max-width: 120mm;
}

/* 5. Styled Composition Page */
.pdf-styled-composition {
    padding: 20mm;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pdf-styled-header {
    text-align: center;
    margin-bottom: 10mm;
}
.pdf-styled-header h3 {
    font-size: 12px;
    color: #6F8A7A;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 5mm;
    font-style: normal;
}
.pdf-styled-header h1 {
    font-size: 36px;
}
.pdf-styled-image {
    max-width: 90%;
    height: auto;
    max-height: 180mm;
    object-fit: contain;
    object-position: center;
    background: transparent;
    margin-bottom: 10mm;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.pdf-styled-note {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    text-align: center;
    max-width: 140mm;
    margin: 0 auto;
}

/* 6. Pieces Page */
.pdf-pieces-page {
    padding: 20mm;
}
.pdf-pieces-header h1 {
    font-size: 32px;
    margin-bottom: 15mm;
}
.pdf-piece-row {
    display: flex;
    gap: 10mm;
    margin-bottom: 15mm;
    padding-bottom: 15mm;
    border-bottom: 1px solid #EAE8E3;
}
.pdf-piece-image {
    width: 80mm;
    height: 80mm;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #EAE8E3;
}
.pdf-piece-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.pdf-piece-ref {
    font-size: 12px;
    color: #C1A265;
    font-style: italic;
    margin-bottom: 5mm;
}
.pdf-piece-title {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 5mm;
}
.pdf-piece-vendor {
    font-size: 12px;
    font-style: italic;
    color: #6F8A7A;
    margin-bottom: 10mm;
}
.pdf-piece-desc {
    font-size: 11px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 10mm;
}
.pdf-piece-meta {
    font-size: 10px;
    font-style: italic;
    color: #6F8A7A;
}

/* 7. Procurement Schedule */
.pdf-proc-page {
    padding: 20mm;
}
.pdf-proc-header h3 {
    font-size: 14px;
    color: #C1A265;
    font-family: 'Inter', sans-serif;
    font-style: italic;
    margin-bottom: 5mm;
}
.pdf-proc-header h1 {
    font-size: 36px;
    margin-bottom: 5mm;
}
.pdf-proc-subtitle {
    font-size: 10px;
    font-style: italic;
    color: #6F8A7A;
    margin-bottom: 15mm;
}
.pdf-proc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15mm 10mm;
}
.pdf-proc-item {
    display: flex;
    flex-direction: column;
}
.pdf-proc-item-img {
    width: 100%;
    height: 55mm;
    object-fit: cover;
    background: #EAE8E3;
    margin-bottom: 5mm;
}
.pdf-proc-item-ref {
    font-size: 10px;
    color: #6F8A7A;
    font-style: italic;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.5;
}
.pdf-proc-item-title {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}
.pdf-proc-item-vendor {
    font-size: 10px;
    font-style: italic;
    color: #6F8A7A;
    margin-bottom: 5px;
}
.pdf-proc-item-meta {
    font-size: 9px;
    color: #666;
    margin-bottom: 10px;
}
.pdf-proc-item-bottom {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #EAE8E3;
    padding-top: 5px;
    font-size: 10px;
}
.pdf-proc-status {
    margin-top: 8px;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 5px;
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
}
.status-dot.approved { background: #6F8A7A; }
.status-dot.ordered { background: #C1A265; }
.status-dot.delivered { background: #2A3D33; }
.status-dot.selected { background: #6F8A7A; }
.status-dot.quote { background: transparent; border: 1px solid #999; }
