#dspcPhotocardTool {
  display: block;
}

.dspc-wrap,
.dspc-wrap * {
  box-sizing: border-box;
}

.dspc-wrap {
  margin: 8px 0 18px;
  font-family: 'Noto Serif Bengali', serif;
}

.dspc-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #b60000;
  color: #ffffff;
  border: 0;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 3px;
  font-family: 'Noto Serif Bengali', serif;
  transition: 0.2s ease;
}

.dspc-open-btn:hover {
  background: #8f0000;
  color: #ffffff;
}

/* Modal */
.dspc-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}

.dspc-modal.is-open {
  display: block;
}

.dspc-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.dspc-modal-box {
  position: relative;
  width: min(1120px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
}

.dspc-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111111;
  color: #ffffff;
  padding: 14px 18px;
}

.dspc-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Noto Serif Bengali', serif;
}

.dspc-close-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #b60000;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.dspc-editor {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  max-height: calc(100vh - 90px);
  overflow: hidden;
}

.dspc-preview-area {
  background: #eeeeee;
  padding: 18px;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.dspc-canvas {
  width: 100%;
  max-width: 620px;
  height: auto;
  background: #dddddd;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.dspc-controls {
  padding: 18px;
  background: #f7f7f7;
  border-left: 1px solid #dddddd;
  overflow-y: auto;
}

.dspc-controls label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 14px;
  font-family: 'Noto Serif Bengali', serif;
}

.dspc-controls textarea,
.dspc-controls input,
.dspc-controls select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 9px 10px;
  font-size: 14px;
  font-family: 'Noto Serif Bengali', serif;
  background: #ffffff;
}

.dspc-controls textarea {
  resize: vertical;
}

.dspc-refresh-btn,
.dspc-download-btn {
  width: 100%;
  border: 0;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 8px;
  font-family: 'Noto Serif Bengali', serif;
}

.dspc-refresh-btn {
  background: #222222;
  color: #ffffff;
}

.dspc-download-btn {
  background: #b60000;
  color: #ffffff;
}

.dspc-refresh-btn:hover {
  background: #000000;
}

.dspc-download-btn:hover {
  background: #8f0000;
}

/* 
  Share row placement:
  Desired order:
  Shares | Views | Download Photocard | Share on Facebook | Share on Twitter | Share Link
*/
.dspc-share-row-inline {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

.dspc-share-row-inline .dspc-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 6px 0 0 !important;
  padding: 0 !important;
  width: auto !important;
  flex: 0 0 auto !important;
}

.dspc-share-row-inline .dspc-open-btn {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 38px !important;
  border-radius: 3px !important;
  white-space: nowrap !important;
  background: #c40000 !important;
  color: #ffffff !important;
  border: 0 !important;
}

/* Modal responsive layout */
@media (max-width: 900px) {
  .dspc-editor {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .dspc-controls {
    border-left: 0;
    border-top: 1px solid #dddddd;
  }

  .dspc-modal-box {
    overflow-y: auto;
  }

  .dspc-canvas {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .dspc-modal-box {
    width: calc(100vw - 14px);
    margin: 7px auto;
  }

  .dspc-modal-header h3 {
    font-size: 17px;
  }

  .dspc-preview-area {
    padding: 10px;
  }

  .dspc-controls {
    padding: 14px;
  }

  .dspc-share-row-inline {
    gap: 4px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
  }

  .dspc-share-row-inline .dspc-wrap {
    margin: 0 4px 0 0 !important;
  }

  .dspc-share-row-inline .dspc-open-btn {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
    line-height: 34px !important;
    white-space: nowrap !important;
  }
}