/* ==============================
   single-transaction_room.css
   ============================== */

/* --- Container Umum --- */
.rekber-room-container {
  width: 95%;
  max-width: 1100px !important;
  margin: 18px auto;
  padding: 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

/* --- HEADER --- */
.rekber-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.rekber-header-left h1.rekber-title {
  font-size: 30px;
  margin: 0;
  font-weight: 700;
}

.rekber-room-code {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.rekber-header-right {
  font-size: 13px;
  color: #777;
  white-space: nowrap;
}

/* --- AVATAR SECTION --- */
.rekber-icons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0 20px;
}

.rekber-icon-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rekber-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  background: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rekber-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rekber-avatar-letter {
  font-weight: bold;
  color: #555;
  font-size: 18px;
}

.rekber-icon-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.rekber-icon-role {
  font-size: 12px;
  color: #999;
}

.rekber-icon-name {
  font-size: 14px;
  font-weight: 600;
}

.rekber-flex-spacer {
  flex: 1;
}

/* --- STATUS BOX --- */
.rekber-status-container {
  margin: 20px 0;
  text-align: center;
}

.rekber-status-box-inner {
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
  display: inline-block;
}

/* Status warna lama */
.rekber-status-gray { background: #9e9e9e; }
.rekber-status-yellow { background: #fbc02d; }
.rekber-status-green { background: #43a047; }
.rekber-status-blue { background: #1e88e5; }
.rekber-status-red { background: #e53935; }

/* Status style baru (dari fungsi PHP bersih) */
.rekber-status-yellow-light {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #7c6500;
}
.rekber-status-green-light {
  background: #e8f5e9;
  border: 1px solid #81c784;
  color: #2e7d32;
}
.rekber-status-blue-light {
  background: #e3f2fd;
  border: 1px solid #64b5f6;
  color: #1565c0;
}
.rekber-status-red-light {
  background: #ffebee;
  border: 1px solid #ef5350;
  color: #b71c1c;
}
.rekber-status-gray-light {
  background: #f5f5f5;
  border: 1px solid #bdbdbd;
  color: #616161;
}

.rekber-status-finish {
  text-align: center;
  color: #2e7d32;
  font-weight: 700;
  margin-top: 10px;
}

.rekber-status-claimed {
  text-align: center;
  color: #b71c1c;
  font-weight: 700;
  margin-top: 10px;
}

/* --- HARGA --- */
.rekber-price-display {
  font-size: 18px;
  text-align: left;
  margin-bottom: 15px;
  font-weight: 700;
}

/* --- PRODUK --- */
.rekber-product-area {
  margin-bottom: 20px;
}

.rekber-produk-box {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px 15px;
  background: #fafafa;
}

.rekber-produk-title {
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 15px;
}

.rekber-produk-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.rekber-no-product {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 15px 0;
}

/* --- ACTION AREA --- */
.rekber-action-area {
  text-align: center;
  margin: 10px 0 25px;
}

/* --- TOMBOL (baru dari PHP bersih) --- */
.rekber-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.rekber-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.rekber-btn-green { background: #4caf50; color: #fff; }
.rekber-btn-blue { background: #2196f3; color: #fff; }
.rekber-btn-red { background: #f44336; color: #fff; }
.rekber-btn-orange { background: #ff9800; color: #fff; }
.rekber-btn-gray { background: #9e9e9e; color: #fff; }
.rekber-btn-block { display: block; width: 100%; }

/* --- UPLOAD FORM --- */
.rekber-upload-wrap {
  border-top: 1px solid #eee;
  padding-top: 15px;
  margin-top: 15px;
}

.rekber-upload-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rekber-upload-row {
  display: flex;
  gap: 10px;
}

.rekber-input-text {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.rekber-input-price {
  max-width: 150px;
}

.rekber-input-textarea {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  resize: vertical;
}

.rekber-upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rekber-upload-btn {
  background: #1e88e5;
  color: #fff;
}

.rekber-upload-btn:hover {
  background: #1565c0;
}

.rekber-upload-msg {
  font-size: 13px;
  color: #777;
  margin-left: 10px;
}

/* --- CANCEL ROOM --- */
.cancel-room-wrap {
  text-align: left;
  margin-top: 10px;
}

.cancel-room-btn {
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.cancel-room-btn:hover {
  background: #c62828;
}

/* --- CHAT BOX --- */
.rekber-chat-box {
  border-top: 2px solid #eee;
  margin-top: 25px;
  padding-top: 15px;
}

.rekber-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
}

.rekber-chat-avatar-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}

.rekber-chat-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.rekber-chat-name {
  font-weight: 600;
  font-size: 15px;
}

.rekber-chat-status {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.rekber-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.rekber-dot-online { background: #43a047; }
.rekber-dot-offline { background: #999; }

.rekber-online-text {
  color: #43a047;
  font-weight: 500;
}

.rekber-chat-messages {
  height: 400px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  font-size: 14px;
  line-height: 1.4;
}

/* --- CHAT INPUT --- */
.rekber-chat-input-wrap {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.rekber-chat-input {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}

.rekber-chat-send {
  background: #1e88e5;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.3s;
}

.rekber-chat-send:hover {
  background: #1565c0;
}

/* --- Scrollbar Styling --- */
.rekber-chat-messages::-webkit-scrollbar {
  width: 6px;
}
.rekber-chat-messages::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}
.rekber-chat-messages::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}
/* === DESKTOP / TABLET === */
.rekber-room-container {
  width: 95%;
  max-width: 1100px;
  margin: 18px auto;
  padding: 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Pastikan teks dan deskripsi tidak nabrak */
.rekber-produk-desc,
.rekber-produk-title {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Chat elements */
.rekber-chat-messages {
  padding: 20px;
  border-radius: 8px;
  overflow-x: hidden;
}
.rekber-chat-input-wrap {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.rekber-chat-send {
  flex-shrink: 0;
}
.rekber-chat-avatar-img {
  max-width: 45px;
  height: auto;
}

/* Biar body/html tidak overflow horizontal */
html, body {
  overflow-x: hidden !important;
  width: 100%;
}

/* === MOBILE === */
@media only screen and (max-width: 768px) {
  .rekber-room-container {
    width: 100% !important;       /* full width */
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 0;              /* optional */
  }

  /* Elementor & Astra */
  .ast-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }
  .elementor-sticky {
    width: 100% !important;
    left: 0 !important;
  }
  .e-con-boxed {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
