@media print {
    .ad-delete-btn { display: none !important; }
  }
  
  /* Hide delete button when in preview mode */
  .mce-content-readonly .ad-delete-btn,
  .tox-edit-area--readonly .ad-delete-btn { 
    display: none !important; 
  }
  
  /* Styling for delete button */
  .ad-delete-btn { 
    opacity: 1; 
    transition: opacity 0.2s ease;
    display: none !important;
  }
  
  .ad-content:hover .ad-delete-btn { 
    opacity: 1; 
  }
  
  .ad-delete-btn:hover { 
    background-color: #dc2626 !important; 
    opacity: 1;
    transform: scale(1.1);
  }

  .ad-content {
    margin: 0 auto;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
  }

  
  
  /* Ad Layout Classes */
  .ad-content.fullimage-layout {
    flex-direction: column;
  }
  
  .ad-content.leftimage-layout {
    flex-direction: row;
  }
  
  .ad-content.rightimage-layout {
    flex-direction: row;
  }

  .rightimage-layout {
    display: flex !important;
  }

  .leftimage-layout {
    display: flex !important;
  }
  
  .ad-content.default-layout {
    flex-direction: row;
  }

  
  
  /* Image positioning for different layouts */
  .fullimage-layout .ad-image-container {
    order: 0;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .leftimage-layout .ad-image-container {
    order: 0;
    width: 33.33% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* height: 100px; */
  }

  .leftimage-layout .ad-image-container img {
    width: 100% !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: contain !important;
  }

  .rightimage-layout .ad-image-container img {
    width: 100% !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: contain !important;
  }

  .default-layout .ad-image-container img {
    width: 100% !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: contain !important;
  }
  
  .rightimage-layout .ad-image-container {
    order: 1;
    width: 33.33% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* height: 100px; */
  }
  
  .default-layout .ad-image-container {
    order: 1;
    width: 33.33% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* height: 100px; */
  }
  
  /* Text positioning for different layouts */
  .fullimage-layout .ad-text-container {
    order: 1;
    width: 100%;
  }
  
  .leftimage-layout .ad-text-container {
    order: 1;
    flex: 1;
    width: 66.67%;
  }
  
  .rightimage-layout .ad-text-container {
    order: 0 !important;
    flex: 1 !important;
    width: 66.67% !important;
  }
  
  .default-layout .ad-text-container {
    order: 0;
    flex: 1;
    width: 66.67%;
  }
  
  /* Ad Text Container Styling - Matching the image design */
  .ad-text-container {
    padding: 0px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.4;
  }
  
  .ad-text-container h4 {
    margin: 0 0 4px 0 !important;
    font-size: 20px !important;
    font-weight: bold !important;
    color: #2563eb !important;
    line-height: 1.2 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  }
  
  .ad-text-container p {
    margin: 0 0 8px 0 !important;
    font-size: 16px !important;
    color: #374151 !important;
    line-height: 1.7 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  }
  
  .ad-text-container div {
    margin-top: 8px !important;
  }
  
  .ad-text-container span {
    font: italic normal bold 16px / 28px Inter !important;
    letter-spacing: 0px !important;
    color: #486AFB !important;
    cursor: pointer !important;
  }
  
  .ad-text-container span:hover {
    color: #3b5af9 !important;
    text-decoration: underline !important;
  }

  

  .ad-hedline:hover {
    text-decoration: none !important;
  }

  .ad-para-content:hover {
    text-decoration: none !important;
  }

  /* Prevent underline on headline and paragraph when hovering over the entire ad */
  .ad-content:hover .ad-hedline {
    text-decoration: none !important;
  }

  .ad-content:hover .ad-para-content {
    text-decoration: none !important;
  }

  /* Target parent a tag to prevent underline on specific elements */
  a:hover .ad-content .ad-hedline {
    text-decoration: none !important;
  }

  a:hover .ad-content .ad-para-content {
    text-decoration: none !important;
  }

  a .ad-content .ad-hedline {
    text-decoration: none !important;
  }

  a .ad-content .ad-para-content {
    text-decoration: none !important;
  }

  .ad-link {
    text-decoration: none !important;
  }

  .ad-link:hover {
    text-decoration: none !important;
  }

  /* Override conflicting plugin CSS with higher specificity */
  .type-post a:hover .ad-content h4,
  .type-post a:focus .ad-content h4,
  .type-post a:active .ad-content h4 {
    text-decoration: none !important;
  }

  .type-post a:hover .ad-content .ad-para-content,
  .type-post a:focus .ad-content .ad-para-content,
  .type-post a:active .ad-content .ad-para-content {
    text-decoration: none !important;
  }

  .type-post a:hover .ad-content .ad-hedline,
  .type-post a:focus .ad-content .ad-hedline,
  .type-post a:active .ad-content .ad-hedline {
    text-decoration: none !important;
  }

  /* Override conflicting plugin CSS for ad-link class */
  .type-post a.ad-link:hover,
  .type-post a.ad-link:focus,
  .type-post a.ad-link:active {
    text-decoration: none !important;
  }

  /* Additional image centering rules for frontend */
  .ad-content img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    height: auto !important;
  }

  /* Ensure image containers are flex containers */
  .ad-content .ad-image-container,
  .ad-content [class*="image"],
  .ad-content [class*="img"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Override any conflicting styles */
  .ad-content .ad-image-container img,
  .ad-content [class*="image"] img,
  .ad-content [class*="img"] img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 !important;
  }

  