/* --- Base Card Wrapper --- */
.sps-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}
.sps-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
#video-upload-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.video-upload-box {
  text-align: center;
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 320px;
}

.upload-label {
  font-size: 1rem;
  margin: 12px 0;
  font-weight: 500;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #130D60;
  transition: width 0.3s ease;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #ccc;
  border-top-color: #130D60;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

.upload-size-text {
  font-size: 0.9rem;
  margin-top: 8px;
  color: #555;
}


/* --- Headings --- */
.sps-card h2,
.sps-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #222;
}

/* --- Labels & Inputs --- */
.sps-label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}
.sps-input,
.sps-textarea,
.sps-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s;
}
.sps-input:focus,
.sps-textarea:focus,
.sps-select:focus {
  border-color: #0073aa;
  outline: none;
  background: #f0f8ff;
}
.sps-textarea {
  resize: vertical;
  min-height: 60px;
}

/* --- Button --- */
.sps-button {
  background-color: #0073aa;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.sps-button:hover {
  background-color: #005f8d;
}

/* --- Remove Button --- */
.sps-remove-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 14px;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
}
.sps-remove-btn:hover {
  background: #c0392b;
}

/* --- Dropzone --- */
.sps-dropzone {
  border: 2px dashed #ccc;
  background: #fafafa;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: #777;
  font-size: 15px;
  transition: border-color 0.3s ease;
}
.sps-dropzone:hover {
  border-color: #0073aa;
  background: #f0f8ff;
}

.sps-card label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

/* --- Modal --- */
.sps-modal-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sps-modal {
    position: relative;
    background: #fff;
    padding: 20px;
    z-index: 9999 !important;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}


.sps-close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 22px;
  color: #888;
  cursor: pointer;
}

/* --- Grid Layouts --- */
.sps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* --- Section Headings --- */
.sps-section-title {
  font-size: 20px;
  font-weight: 600;
  color: #130D60;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

/* --- Utility --- */
.sps-flex {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sps-muted {
  font-size: 13px;
  color: #777;
}
.sps-icon-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #444;
}

        .sps-dashboard-grid {
            display: grid;
            grid-template-columns: 1fr 320px;
            gap: 40px;
            padding: 40px;
            background: #f7f7f7;
            font-family: 'Segoe UI', sans-serif;
        }
        .sps-main-column, .sps-side-column { display: flex; flex-direction: column; }
        .sps-card {
            background: #fff;
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 6px 12px rgba(0,0,0,0.06);
            margin-bottom: 20px;
        }
        

     
        .sps-open-house-list { margin-bottom: 20px; }
        .sps_open_house_entry { background: #fff; border:1px solid #ddd; border-radius:8px; padding:12px; display:flex; align-items:center; gap:10px; margin-bottom:15px; position: relative; }
        .sps_open_house_entry .sps-field { display:flex; flex-direction:column; flex:1; }
        .sps-field label { font-size:13px; color:#555; margin-bottom:4px; }
        .sps-remove-open-house { background:white; color: red; border:none; border-radius:50%; width:24px; height:24px; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; }
    
    .sps-quill-editor  {
        background: white;
    }

.sps-video-item-modern {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
  position: relative;
}

.sps-video-item-modern .thumbnail-wrapper {
  width: 128px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
}

.sps-video-item-modern .thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sps-video-item-modern .video-info {
  flex: 1;
  min-width: 240px;
}

.sps-video-item-modern input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.sps-video-item-modern .video-url {
  font-size: 12px;
  color: #666;
  word-break: break-all;
  line-height: 1.4;
}

.sps-video-item-modern .sps-remove-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: red;
  color: white;
  border: none;
  border-radius: 10px;
  width: auto;
  height: auto;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}


/* Responsive stacking */
@media (max-width: 1200px) {
  .sps-video-item-modern {
    flex-direction: column;
    align-items: stretch;
  }
  
   .sps-dashboard-grid {
            display: block !important;
   }

  .sps-video-item-modern .thumbnail-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .sps-video-item-modern .thumbnail-img {
    height: 100%;
  }

  .sps-video-item-modern .video-info {
    width: 100%;
  }
}
 
    
        
        .sps-dashboard-grid {
            display: grid;
            grid-template-columns: 1fr 320px;
            gap: 40px;
            padding: 40px;
            background: #f7f7f7;
            font-family: 'Segoe UI', sans-serif;
        }
        .sps-main-column, .sps-side-column { display: flex; flex-direction: column; }
        .sps-card {
            background: #fff;
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 6px 12px rgba(0,0,0,0.06);
            margin-bottom: 20px;
        }
        .sps-card h3 {
            font-size: 14px;
            letter-spacing: 1px;
            color: #666;
            margin-bottom: 16px;
            text-transform: uppercase;
        }
        .sps-input, .sps-textarea, select {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid #ccc;
            border-radius: 8px;
            margin-bottom: 20px;
            font-size: 15px;
            background: #fff;
            transition: border-color 0.3s;
        }
        .sps-input:focus, .sps-textarea:focus {
            border-color: #0073aa;
            outline: none;
        }
        .sps-dashboard-grid h2 {
            font-size: 20px;
            margin-top: 40px;
            border-bottom: 1px solid #e0e0e0;
            padding-bottom: 8px;
            color: #222;
        }
        .sps-help {
            font-size: 12px;
            color: #888;
        }
        .sps-button {
            background-color: #0073aa;
            color: white;
            border: none;
            padding: 10px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            margin-bottom: 15px;
        }
        .sps-button:hover {
            background-color: #005f8d;
        }
        .sps-tags {
            list-style: none;
            padding: 0;
            margin: 10px 0 20px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        .sps-tags li {
            background: #0073aa;
            color: #fff;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 14px;
            display: flex;
            align-items: center;
        }
        .sps-tags li .remove-amenity {
            margin-left: 8px;
            background: #fff;
            color: #0073aa;
            font-weight: bold;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 12px;
            cursor: pointer;
        }
        .sps-suggestion-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 20px;
        }
        .sps-suggestion {
            background: #e0e0e0;
            padding: 6px 12px;
            border-radius: 20px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .sps-suggestion:hover {
            background: #ccc;
        }


.sps-video-list {
  margin-top: 30px;
  list-style: none;
  padding: 0;
}

.sps-video-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ddd;
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.sps-video-item input.title {
  flex-grow: 1;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.sps-video-item a {
  flex-shrink: 0;
  font-size: 13px;
  color: #130D60;
  text-decoration: none;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sps-video-item button.remove {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
}



.sps-modal {
  background: white;
  padding: 20px 30px;
  border-radius: 8px;
  width: 400px;
  position: relative;
}

.sps-modal h3 {
  margin-top: 0;
  font-size: 20px;
}

.sps-method-select button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  cursor: pointer;
  border-radius: 5px;
}

#video-link-input, #video-title-input {
  width: 100%;
  margin: 10px 0;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

#confirm-link-btn, #save-video-btn {
  background: #130D60;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.sps-close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

#sps-video-wrapper {
  font-family: sans-serif;
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
}

.sps-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sps-title {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
}

.sps-title .sps-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  opacity: 0.7;
}

.sps-subtitle {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
  margin-bottom: 20px;
}

#add-video-btn {
  background-color: #25a4d3;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
}

.sps-dropzone {
  border: 2px dashed #c2c2c2;
  background: #f9f9f9;
  padding: 30px;
  text-align: center;
  border-radius: 10px;
}

.sps-drop-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.sps-drop-icon {
  width: 40px;
  height: 40px;
  opacity: 0.4;
  margin-bottom: 10px;
}

#sps-video-form {
  border: 1px solid #ddd;
  padding: 16px;
  border-radius: 8px;
  background: #fcfcfc;
}

#sps-video-form input[type="text"] {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

#sps-video-form button {
  background: #130D60;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
}

/*PHOTOS*/

  
    .sps-gallery-item {
  cursor: grab;
}
.sps-gallery-item.dragging {
  cursor: grabbing;
}

.sps-gallery-item img {
    height: 200px;
    object-fit: cover;
    
}

    /* --- Dropzone full-width card --- */
    .sps-dropzone-wrapper {
      width: 100%;
      margin-bottom: 20px;
    }
    #sps-dropzone {
      border: 2px dashed #ccd0d5;
      border-radius: 6px;
      background: #f9f9f9;
    }
    #sps-dropzone .dz-message {
      text-align: center;
      padding: 60px 0;
      color: #888;
      font-size: 1.1rem;
    }
    #sps-dropzone .dz-message .dashicons {
      font-size: 2.5rem;
      display: block;
      margin-bottom: 8px;
    }

    /* --- Controls bar --- */
    .sps-gallery-controls {
      text-align: center;
      margin-bottom: 16px;
    }
    .sps-gallery-controls h3 {
      margin: 0 0 4px;
      font-size: 1.25rem;
    }
    .sps-gallery-controls p {
      margin: 0;
      color: #555;
      font-size: .95rem;
    }

    /* --- Grid of cards --- */
    #sps-gallery-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
      gap: 16px;
      list-style: none;
      padding: 0;
      margin: 0 0 20px;
    }
    .sps-gallery-item {
      position: relative;
      background: #fff;
      border: 1px solid #e1e1e1;
      border-radius: 6px;
      overflow: hidden;
      cursor: grab;
      transition: box-shadow .15s ease, transform .15s ease;
    }
    .sps-gallery-item.dragging {
      opacity: .8;
      transform: scale(1.02);
    }
    .sps-gallery-thumb {
      width: 100%;
      display: block;
      object-fit: cover;
      height: 120px;
    }
    .sps-gallery-fields {
      padding: 8px;
    }
    .sps-gallery-fields input,
    .sps-gallery-fields textarea {
      width: 100%;
      border: 1px solid #ccc;
      border-radius: 4px;
      padding: 6px;
      margin-bottom: 6px;
      font-size: 14px;
      box-sizing: border-box;
    }
    .sps-gallery-fields textarea { resize: vertical; }

    /* --- Hover icons & handle --- */
    .sps-gallery-item .drag-handle,
    .sps-gallery-item .remove-btn {
      position: absolute;
      background: rgba(255,255,255,0.8);
      border: none;
      font-size: 16px;
      line-height: 1;
      padding: 4px;
      border-radius: 4px;
      opacity: 0;
      transition: opacity .2s;
      cursor: pointer;
    }
    .sps-gallery-item:hover .drag-handle,
    .sps-gallery-item:hover .remove-btn {
      opacity: 1;
    }
    
    .sps-gallery-item .remove-btn {
      top: 8px; left: 8px;
      color: #e74c3c;
    }

    /* --- Order badge --- */
    .sps-gallery-item .order-badge {
      position: absolute;
      bottom: 6px; left: 6px;
      background: rgba(0,0,0,0.6);
      color: #fff;
      font-size: 12px;
      padding: 2px 6px;
      border-radius: 3px;
    }

    /* --- Footer --- */
    .sps-gallery-footer { text-align: right; }
    
    
.sps_matterport_entry {
  cursor: grab;
}
.sps_matterport_entry {
  position: relative;
  padding-left: 35px; /* Make room for handle */
}
.sps-sortable-tours {
    margin-top: 20px;
}

.sps_matterport_entry {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  position: relative;
  transition: all 0.2s ease;
}
.sps_matterport_entry:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.sps_matterport_entry .sps-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.sps_matterport_entry label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}
.sps_matterport_entry input.sps-input {
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: border-color 0.2s;
}
.sps_matterport_entry input.sps-input:focus {
  border-color: #0073aa;
  outline: none;
}
.sps_matterport_entry iframe {
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: 0 0 0 1px #ccc;
}
.sps-remove-matterport {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  color: black;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

#sps_add_3d_tour {
  margin-top: 10px;
  background-color: #0073aa;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
#sps_add_3d_tour:hover {
  background-color: #005c8a;
}

/* Modal Styling */
#sps_3d_modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.sps-modal {
  position: relative;
  z-index: 2;
  background: #fff;
    
  padding: 20px 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.sps-close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  font-size: 22px;
  border: none;
  cursor: pointer;
  color: #888;
  font-weight: bold;
}

/*Floor Plans*/
.sps-floorplan-container {
  margin-top: 30px;
}

.sps-floorplan-dropzone {
  border: 2px dashed #ccc;
  background: #fafafa;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  color: #777;
  font-size: 15px;
  margin-bottom: 30px;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.sps-floorplan-dropzone:hover {
  border-color: #0073aa;
  background: #f0f8ff;
}

.sps-floorplan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.sps-floorplan-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.sps-floorplan-thumb {
  max-width: 100%;
  border-radius: 8px;
  cursor: move;
  margin-bottom: 10px;
}

.sps-floorplan-desc {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
  margin-bottom: 10px;
}

.sps-floorplan-desc:focus {
  outline: none;
  border-color: #0073aa;
  background: #f0f8ff;
}

.sps-floorplan-item .remove-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  color: red;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 16px;
  font-weight: bold;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
}

    .sps-documents-wrapper {
        margin-top: 1em;
    }

    .sps-documents-list {
        list-style: none;
        padding: 0;
        margin-top: 1em;
    }

    .sps-document-item {
        display: flex;
        align-items: center;
        gap: 0.75em;
        padding: 0.75em 1em;
        background: #f9f9f9;
        border: 1px solid #ddd;
        margin-bottom: 0.5em;
        border-radius: 6px;
    }

    .sps-document-item input.doc-title {
        flex: 1;
        padding: 0.4em 0.6em;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

    .sps-document-item .drag-handle {
        cursor: move;
        font-size: 1.2em;
        user-select: none;
    }

    .sps-document-item .remove-btn {
        background: #e74c3c;
        color: #fff;
        border: none;
        border-radius: 4px;
        font-size: 1em;
        padding: 0.2em 0.6em;
        cursor: pointer;
    }

    .sps-document-item a {
        white-space: nowrap;
        color: #2c3e50;
        text-decoration: underline;
    }
