/* =========================================================
   TeachThis Document Seller Styling
   Product page + cart popup shell
   ========================================================= */


/* =========================================================
   Document Seller Product Page
   ========================================================= */

body.com_dms.view-document #dms-document-page.dms-document {
  max-width: 720px;
  margin: 32px auto 70px;
  background: #FFFFFF;
  border: 1px solid #DEDEDE;
  border-radius: 16px;
  box-shadow:
    0 4px 8px 3px rgba(0, 0, 0, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  box-sizing: border-box;
}

/* Heading bar */
body.com_dms.view-document #dms-document-page .dms-box-heading {
  background: #F5F5F5;
  border-bottom: 1px solid #DEDEDE;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Product title */
body.com_dms.view-document #dms-document-page .dms-page-heading {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 20px 24px !important;
  box-sizing: border-box;
  color: #555555;
  font-family: Inter, Arial, sans-serif;
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
}

/* Main details area */
body.com_dms.view-document #dms-document-details {
  padding: 24px;
  background: #FFFFFF;
  box-sizing: border-box;
}

/* Button wrapper cleanup */
body.com_dms.view-document #dms-document-details .dms-taskbar,
body.com_dms.view-document #dms-document-details .dms-taskbar ul,
body.com_dms.view-document #dms-document-details .dms-taskbar li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Purchase button */
body.com_dms.view-document #dms-document-details .dms-taskbar a.btn.btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 210px;
  height: 44px;
  padding: 0 24px !important;
  border: 2px solid #D85C86 !important;
  border-radius: 6px !important;
  background: #D85C86 !important;
  color: #FFFFFF !important;
  font-family: Inter, Arial, sans-serif;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  text-align: center;
  text-decoration: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* Purchase button hover/focus */
body.com_dms.view-document #dms-document-details .dms-taskbar a.btn.btn-primary:hover,
body.com_dms.view-document #dms-document-details .dms-taskbar a.btn.btn-primary:focus {
  background: #FFFFFF !important;
  color: #D85C86 !important;
  border-color: #D85C86 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* Icon spacing inside button */
body.com_dms.view-document #dms-document-details .dms-taskbar a.btn.btn-primary i,
body.com_dms.view-document #dms-document-details .dms-taskbar a.btn.btn-primary em,
body.com_dms.view-document #dms-document-details .dms-taskbar a.btn.btn-primary span[class*="icon"],
body.com_dms.view-document #dms-document-details .dms-taskbar a.btn.btn-primary .fa {
  margin-right: 8px;
}


/* =========================================================
   Document Seller Product Page - Mobile
   ========================================================= */

@media (max-width: 767.98px) {
  body.com_dms.view-document #dms-document-page.dms-document {
    max-width: none;
    width: calc(100% - 24px);
    margin: 16px auto 32px;
    border-radius: 10px;
  }

  body.com_dms.view-document #dms-document-page .dms-page-heading {
    padding: 16px 18px !important;
    font-size: 24px;
    line-height: 30px;
  }

  body.com_dms.view-document #dms-document-details {
    padding: 20px 18px 28px;
  }

  body.com_dms.view-document #dms-document-details .dms-taskbar a.btn.btn-primary {
    width: 100%;
    min-width: 0;
    height: 46px;
    font-size: 16px !important;
  }
}


/* =========================================================
   Document Seller Cart Popup - Colorbox Shell
   ========================================================= */

body.com_dms #cboxOverlay {
  background: rgba(0, 0, 0, 0.55) !important;
}

body.com_dms #colorbox {
  max-width: 820px !important;
  width: calc(100vw - 32px) !important;
  height: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  box-sizing: border-box !important;
  outline: none !important;
}

body.com_dms #cboxWrapper,
body.com_dms #cboxContent,
body.com_dms #cboxLoadedContent {
  width: 100% !important;
  height: auto !important;
  box-sizing: border-box !important;
}

body.com_dms #cboxContent {
  background: #FFFFFF !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.18) !important;
}

body.com_dms #cboxLoadedContent {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  background: #FFFFFF !important;
}

body.com_dms #cboxClose {
  top: 14px !important;
  right: 14px !important;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid #DEDEDE !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  color: #555555 !important;
  text-indent: -9999px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16) !important;
}

body.com_dms #cboxClose::before,
body.com_dms #cboxClose::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 9px;
  width: 16px;
  height: 2px;
  background: #555555;
  border-radius: 2px;
}

body.com_dms #cboxClose::before {
  transform: rotate(45deg);
}

body.com_dms #cboxClose::after {
  transform: rotate(-45deg);
}

body.com_dms #cboxClose:hover {
  border-color: #D85C86 !important;
}

body.com_dms #cboxClose:hover::before,
body.com_dms #cboxClose:hover::after {
  background: #D85C86;
}

/* =========================================================
   Document Seller Cart Popup - Cart Contents
   ========================================================= */

/* Main cart content area */
body.com_dms #cboxLoadedContent {
  font-family: Inter, Arial, sans-serif;
  color: #555555;
}

/* Cart title */
body.com_dms #cboxLoadedContent h1,
body.com_dms #cboxLoadedContent .dms-page-heading {
  margin: 0 !important;
  padding: 18px 24px 14px !important;
  background: #FFFFFF;
  border-bottom: 1px solid #DEDEDE;
  color: #333333;
  font-size: 22px !important;
  line-height: 28px !important;
  font-weight: 700 !important;
  box-sizing: border-box;
}

/* Cart form/content spacing */
body.com_dms #cboxLoadedContent form,
body.com_dms #cboxLoadedContent #dms_form {
  margin: 0 !important;
  padding: 0 !important;
}

/* Cart table */
body.com_dms #cboxLoadedContent table {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  background: #FFFFFF !important;
  border: none !important;
  font-size: 15px;
}

/* Table header */
body.com_dms #cboxLoadedContent table th {
  padding: 10px 12px !important;
  background: #F5F5F5 !important;
  border: 1px solid #DEDEDE !important;
  color: #444444 !important;
  font-size: 14px !important;
  line-height: 20px;
  font-weight: 700 !important;
  text-align: left;
}

/* Table cells */
body.com_dms #cboxLoadedContent table td {
  padding: 12px !important;
  border: 1px solid #DEDEDE !important;
  background: #FFFFFF !important;
  color: #555555 !important;
  font-size: 15px !important;
  line-height: 21px;
  vertical-align: middle !important;
}

/* Remove column */
body.com_dms #cboxLoadedContent table th:nth-child(2),
body.com_dms #cboxLoadedContent table td:nth-child(2) {
  width: 80px;
  text-align: center !important;
}

/* Price column */
body.com_dms #cboxLoadedContent table th:last-child,
body.com_dms #cboxLoadedContent table td:last-child {
  width: 100px;
  text-align: right !important;
  white-space: nowrap;
}

/* Document title cell */
body.com_dms #cboxLoadedContent table td:first-child {
  color: #555555 !important;
  font-weight: 500;
}

/* Subtotal row */
body.com_dms #cboxLoadedContent table tr:last-child td {
  background: #FAFAFA !important;
  font-weight: 700 !important;
}

/* Remove/trash icon */
body.com_dms #cboxLoadedContent table a,
body.com_dms #cboxLoadedContent table i,
body.com_dms #cboxLoadedContent table .fa,
body.com_dms #cboxLoadedContent table [class*="trash"],
body.com_dms #cboxLoadedContent table [class*="remove"] {
  color: #246B87 !important;
  text-decoration: none !important;
}

/* Button area */
body.com_dms #cboxLoadedContent .dms-taskbar,
body.com_dms #cboxLoadedContent .btn-toolbar,
body.com_dms #cboxLoadedContent .form-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  padding: 14px 12px 18px !important;
  margin: 0 !important;
  background: #FFFFFF;
  border-top: 1px solid #EFEFEF;
  box-sizing: border-box;
}

/* General popup buttons */
body.com_dms #cboxLoadedContent button,
body.com_dms #cboxLoadedContent .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  min-width: 96px;
  padding: 0 16px !important;
  border-radius: 6px !important;
  font-family: Inter, Arial, sans-serif;
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  text-align: center;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: all 0.25s ease;
  cursor: pointer;
}

/* Buy more button */
body.com_dms #cboxLoadedContent #add_more_item,
body.com_dms #cboxLoadedContent button[name*="more"],
body.com_dms #cboxLoadedContent .btn-secondary {
  border: 2px solid #246B87 !important;
  background: #FFFFFF !important;
  color: #246B87 !important;
}

/* Buy more hover */
body.com_dms #cboxLoadedContent #add_more_item:hover,
body.com_dms #cboxLoadedContent button[name*="more"]:hover,
body.com_dms #cboxLoadedContent .btn-secondary:hover {
  background: #246B87 !important;
  color: #FFFFFF !important;
}

/* Checkout button */
body.com_dms #cboxLoadedContent #check_out,
body.com_dms #cboxLoadedContent button[name*="checkout"],
body.com_dms #cboxLoadedContent .btn-primary {
  border: 2px solid #D85C86 !important;
  background: #D85C86 !important;
  color: #FFFFFF !important;
}

/* Checkout hover */
body.com_dms #cboxLoadedContent #check_out:hover,
body.com_dms #cboxLoadedContent button[name*="checkout"]:hover,
body.com_dms #cboxLoadedContent .btn-primary:hover {
  background: #FFFFFF !important;
  color: #D85C86 !important;
}

/* =========================================================
   Document Seller Cart Popup - Mobile Shell
   ========================================================= */

@media (max-width: 767.98px) {
  body.com_dms #colorbox {
    width: calc(100vw - 24px) !important;
    max-width: none !important;
    top: 70px !important;
  }

  body.com_dms #cboxContent {
    border-radius: 12px !important;
  }

  body.com_dms #cboxClose {
    top: 10px !important;
    right: 10px !important;
  }
}

@media (max-width: 480px) {
  body.com_dms #colorbox {
    width: calc(100vw - 20px) !important;
    top: 60px !important;
  }
}
