/* The wrapper container needs relative positioning */
.pdf-details-table-container {
    position: relative;
    padding: 5px; /* Space for the border to breathe */
}

/* The Green Dotted Square */
.pdf-editor-focus-box {
    position: relative;
    border: 3px dotted #166534; /* Dark green matching your button */
    
    margin: 10px;
    background: transparent;
    transition: all 0.3s ease;
}

/* Positioning the Edit Button perfectly in the corner */
.page2-edit-trigger {
    position: absolute;
    bottom: -5px; /* Pulls it down to sit on the line */
    right: 20px;
    background: #166534;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 99;
}

.page2-menu-modal {
    max-width: 650px !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.page2-menu-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-left h2 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
    font-weight: 700;
}

.modal-close-x {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
}

.edit-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 15px;
    padding: 30px;
}

.menu-option {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.menu-option:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.menu-option .dashicons {
    color: #64748b;
    font-size: 20px;
}

/* Hide the row in the Editor 
*/
.is-hidden-pdf {
    display: none !important;
}

/* 1. The Grid Container */
.areas-grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 20px 30px;
    padding: 15px 0;
}

/* 2. The Field Labels */
.areas-grid-inputs .field-label {
    display: block;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 14px;
}

/* 3. Horizontal Row for Input + Checkbox */
.areas-grid-inputs .input-with-checkbox {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 4. The Wrapper for the Input and m² suffix */
.areas-grid-inputs .year-input-wrapper {
    position: relative;
    flex: 0 0 140px; /* Fixed width for the input box */
}

.areas-grid-inputs input[type="text"], 
.areas-grid-inputs input[type="number"] {
    width: 100%;
    padding: 10px 40px 10px 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
}

/* 5. The m² / m³ Suffix */
.areas-grid-inputs .input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
}

/* 6. Checkbox and Label Alignment */
.areas-grid-inputs .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
}

/* 7. Modal Width Expansion */
.areas-large-modal {
    max-width: 850px !important;
    width: 90%;
}


/* Ensure it is also hidden in the generated PDF 
*/
@media print {
    .is-hidden-pdf {
        display: none !important;
    }
}

/* Hide the green square and button completely during PDF generation */
@media print {
    .pdf-editor-focus-box {
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .page2-edit-trigger {
        display: none !important;
    }
}