/* Main Editor Container */
#pdf-editor-container {
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header / Sticky Bar */
.wp-doc-sticky-bar {
    background: #2c2e2f;
    padding: 10px 20px;
    border-bottom: 1px solid #444;
}

.wp-doc-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wp-doc-filename {
    font-size: 14px;
    color: #ccc;
}

.wp-doc-bar-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wp-doc-pagination {
    background: #1a1a1a;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.wp-doc-zoom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-btn {
    background: none;
    border: 1px solid #555;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
}

.wp-doc-bar-actions {
    display: flex;
    gap: 15px;
}

.wp-doc-bar-actions button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Layout */
.pdf-editor-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.pdf-editor-sidebar {
    width: 220px;
    background: #000;
    padding: 20px;
    border-right: 1px solid #333;
    overflow-y: auto;
}

.slide-thumb-wrapper {
    margin-bottom: 20px;
    cursor: pointer;
}

.slide-thumb-preview {
    width: 100%;
    aspect-ratio: 1.414;
    background-size: cover;
    background-position: center;
    border: 1px solid #333;
    border-radius: 4px;
}

.slide-thumb-wrapper[data-slide-id="1"] .slide-thumb-preview {
    border: 2px solid #2ecc71; /* Green border for active slide from design */
}

.slide-thumb-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.slide-number {
    background: #243b4d;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Main Preview Area */
.pdf-editor-main {
    flex: 1;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.pdf-slide-canvas {
    background: #fff;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 1.414; /* Landscape aspect ratio based on design */
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    position: relative;
    display: flex;
}

/* Slide 1 Layout */
.cover-slide-layout .slide-image-section {
    flex: 6;
    background-size: cover;
    background-position: center;
    position: relative;
}

.cover-slide-layout .slide-content-section {
    flex: 4;
    background: #2c2e2f;
    color: #fff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.address-box {
    font-size: 14px;
    line-height: 1.4;
    text-align: right;
}

.title-box {
    margin-top: 40px;
    position: relative;
}

.editable-text-wrapper {
    padding: 20px;
    border: 2px dashed transparent;
    transition: border 0.3s;
    position: relative;
    text-align: center;
}

.editable-text-wrapper:hover {
    border-color: rgba(46, 204, 113, 0.5);
}

.slide-title {
    font-size: 32px;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    font-weight: bold;
}

.slide-subtitle {
    font-size: 16px;
    font-weight: normal;
    color: #ccc;
    margin: 0;
}

.logo-box {
    display: flex;
    justify-content: flex-end;
}

.partner-logo {
    width: 150px;
    height: 50px;
    background: #e74c3c; /* Red placeholder for Swiss Property logo */
    border-radius: 4px;
}

/* Edit Buttons */
.circular-edit-btn {
    background: #2ecc71;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: absolute;
    z-index: 10;
}

#edit1 {
    bottom: 20px;
    left: 20px;
}

#edit2 {
    bottom: -20px;
    right: -20px;
}

/* Modals */
.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.custom-modal-content {
    background: #fff;
    color: #333;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-header h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* Image Picker Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.picker-img {
    width: 100%;
    aspect-ratio: 1.5;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.picker-img:hover {
    border-color: #2ecc71;
    transform: scale(1.05);
}

/* Attention Modal */
.attention-modal {
    max-width: 700px;
    padding: 0;
    overflow: hidden;
}

.attention-body {
    display: flex;
}

.attention-image {
    flex: 1;
    background: #fdfdfd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.attention-image img {
    max-width: 100%;
    height: auto;
}

.attention-text {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.attention-text h3 {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.attention-text p {
    font-size: 18px;
    line-height: 1.5;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.attention-buttons {
    display: flex;
    gap: 15px;
}

.btn-outline-close {
    flex: 1;
    background: transparent;
    border: 2px solid #bdc3c7;
    color: #7f8c8d;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-solid-back {
    flex: 1;
    background: #2c3e50;
    border: none;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* Text Editor Modal */
.text-editor-modal .modal-field {
    margin-bottom: 20px;
}

.text-editor-modal label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.text-editor-modal input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.attention-box {
    font-size: 12px;
    color: #e67e22;
    margin-top: 5px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.btn-cancel {
    background: #eee;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-update {
    background: #2ecc71;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

/* Force Visibility for Debug */
.custom-modal-overlay.debug-show {
    display: flex !important;
}

/* Ensure Edit Buttons are on top */
.circular-edit-btn {
    z-index: 999 !important;
}

/* Ensure parents don't clip them */
.slide-image-section, .slide-content-section, .editable-text-wrapper {
    overflow: visible !important;
}

/* Image Picker Styling */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 15px;
}

.picker-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.2s;
}

.picker-img:hover {
    transform: scale(1.05);
    border-color: #2ecc71;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

.action-save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.pdfpages {
    width: 297mm !important;
    height: 219mm !important;}


    /* Force exact A4 Landscape dimensions */
    .pdfpages {
        width: 297mm !important;
        height: 219mm !important;
        max-height: 219mm !important;
        overflow: hidden !important;
        page-break-after: always !important;
        page-break-inside: avoid !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        display: block !important;
        position: relative !important;
    }
    .us_custom_fa361869 {
        height: 660px!important;
        min-height: 219mm!important;
        padding: 0px!important;
        background: rgba(0,0,0,0.5)!important;
    }
    .us_custom_6a9fa08b {
        height: 660px!important;
        min-height: 219mm!important;
        padding: 0px!important;
        background: #ffffff!important;
    }

    /* Standard state for all pages */
    .pdfpages,.space_pages {
        transition: opacity 0.3s ease;
    }

    /* Force hide with !important to beat theme styles */
    .pdfpages.is-hidden,.space_pages.is-hidden {
        display: none !important;
    }

    /* Sidebar effect */
    .wp-doc-slide-card.is-selected {
        border: 2px solid #166534 !important;
        opacity: 1 !important;
    }

@media print {
  @page {
          /* This tells the browser hardware: 'Turn the paper sideways' */
          size: A4 landscape !important; 
          margin: 0 !important;
      }
      /* Force hide with !important to beat theme styles */
      .pdfpages.is-hidden {
          display: block !important;
      }
      
      /* Force exact A4 Landscape dimensions */
      .pdfpages {
          width: 297mm !important;
          height: 219mm !important;
          max-height: 219mm !important;
          overflow: hidden !important;
          page-break-after: always !important;
          page-break-inside: avoid !important;
          margin: 0 !important;
          padding: 0 !important;
          box-sizing: border-box !important;
          display: block !important;
          position: relative !important;
      }
      .us_custom_fa361869 {
      height: 660px!important;
      min-height: 220mm!important;
      padding: 0px!important;
      background: rgba(0,0,0,0.5)!important;
      position: relative;
  }
  .us_custom_159f80ca {
      width: 100%!important;
      position: relative !important;
      bottom: -425px!important;
      padding: 1.3rem!important;
      background: rgba(0,0,0,0.71)!important;
      display: flex;
      align-self: end;
  }
      .us_custom_6a9fa08b {
          height: 660px!important;
          min-height: 219mm!important;
          padding: 0px!important;
          background: #ffffff!important;
      }
page-footer{
display:none;
}
a.w-toplink.pos_right.text_none.icon_atleft.active {
    display: none;
}
.wpb_raw_code.wpb_raw_html.wpb_content_element.us_custom_909b2fd0 {
    display: none;
}
      /* Ensure the body doesn't add padding */
      body {
          margin: 0 !important;
          padding: 0 !important;
          backround-color:#000;
      }
      .us_custom_7ec0398b {
              /* Force the height to fit WITHIN the 794px limit of A4 Landscape */
              height: 219mm !important; 
              min-height: 219mm !important;
              
              /* Ensure the background is forced */
              background-color: rgba(0, 0, 0, 0.5) !important;
              -webkit-print-color-adjust: exact !important;
              print-color-adjust: exact !important;
              
              /* Remove any potential margins that add to the height */
              margin: 0 !important;
              padding: 0 !important;
              
              /* Ensure it is treated as a block that can hold the background */
              display: block !important;
          }
    /* 1. Force the first page to start at the absolute top */
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        background-color: #000 !important; /* Forces white if content fails */
    }

    .pdfpages {
        page-break-before: avoid !important;
        page-break-after: always !important;
        margin-top: 0 !important;
        top: 0 !important;

            width: 297mm !important;
            height: 219mm !important;
    }

    /* 2. Hide any WPBakery or Theme spacers that might be at the top */
    .vc_row-full-width, 
    .vc_column-inner, 
    .upb_bg_img_relative {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    .left_row{
    display:none !important;
    }
    section.l-section.wpb_row.height_auto.width_full.type_sticky.is_sticky {
      display: none;
  }
  .w-separator.us_custom_cdf14ffd.size_custom {
      display: none;
  }
  .w-separator.size_large {
      display: none;
  }
}