/* =====================================================
   CONSULTATION PAGE
===================================================== */

.consultation-page {
  min-height: calc(100vh - 90px);
  background: #050505;
  color: #fff;
  padding-top: 30px;
  padding-bottom: 60px;
}

.consultation-state-page {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  background: #050505;
}

.consultation-state-card {
  width: min(640px, 100%);
  margin-top: 30px;
  background: #2d2420;
  border-radius: 20px;
  padding: 42px 35px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.consultation-state-title {
  color: #fff;
  font-size: 25px;
  font-weight: 700;
  margin: 10px 0;
}

.consultation-state-description {
  color: #a99e96;
  font-size: 16px;
  margin-bottom: 25px;
}

.consultation-astrologer-name {
  color: #ffd000;
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: 600;
}


/* =====================================================
   CONNECTING ANIMATION
===================================================== */

.connecting-animation {
  width: 150px;
  height: 150px;
  margin: 0 auto 25px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connecting-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #ffd000;
  color: #1c1512;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  position: relative;
  z-index: 5;
  border: 3px solid #fff0a0;
}

.connecting-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 208, 0, 0.5);
  animation: pulseRing 2s infinite;
}

.ring-1 {
  width: 95px;
  height: 95px;
}

.ring-2 {
  width: 120px;
  height: 120px;
  animation-delay: .4s;
}

.ring-3 {
  width: 145px;
  height: 145px;
  animation-delay: .8s;
}

@keyframes pulseRing {
  0% {
    transform: scale(.85);
    opacity: .2;
  }

  50% {
    transform: scale(1);
    opacity: .8;
  }

  100% {
    transform: scale(1.1);
    opacity: 0;
  }
}

.connecting-dot {
  width: 7px;
  height: 7px;
  background: #ffd000;
  border-radius: 50%;
  position: absolute;
}

.dot-1 {
  top: 5px;
  left: 70px;
}

.dot-2 {
  right: 5px;
  top: 70px;
}

.dot-3 {
  bottom: 5px;
  left: 70px;
}

.dot-4 {
  left: 5px;
  top: 70px;
}


/* =====================================================
   INFO BOX
===================================================== */

.consultation-info-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 208, 0, .12);
  border: 1px solid rgba(255, 208, 0, .35);
  color: #d8cfc8;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 22px;
  text-align: left;
}

.consultation-info-icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffd000;
  color: #17120e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.consultation-info-box strong {
  color: #fff;
}

.consultation-info-box p {
  margin: 4px 0 0;
  color: #aaa09a;
  font-size: 13px;
}


/* =====================================================
   TIMER
===================================================== */

.consultation-expiry,
.accepted-expiry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #211a17;
  padding: 13px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  color: #8f857e;
}

.consultation-expiry strong,
.accepted-expiry strong {
  color: #fff;
  font-size: 18px;
}


/* =====================================================
   BUTTONS
===================================================== */

.consultation-start-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 30px;
  border-radius: 8px;
  border: 0;
  background: #ffd000;
  color: #090705;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.consultation-start-button:hover {
  background: #ffda2b;
  color: #090705;
}

.consultation-cancel-button {
  min-height: 46px;
  padding: 0 28px;
  border-radius: 8px;
  border: 1px solid #777069;
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.consultation-cancel-button:hover {
  background: #332b27;
}


/* =====================================================
   ACCEPTED
===================================================== */

.accepted-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.accepted-circle {
  width: 76px;
  height: 76px;
  background: #ffd000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.accepted-check {
  color: #17110d;
  font-size: 36px;
  font-weight: 900;
}

.accepted-star {
  position: absolute;
  color: #ffd000;
  font-size: 22px;
}

.star-1 {
  top: 5px;
  left: 30px;
}

.star-2 {
  right: 15px;
  top: 40px;
}

.star-3 {
  bottom: 10px;
  left: 12px;
}

.accepted-title {
  color: #fff;
  font-size: 25px;
  font-weight: 700;
}

.accepted-description {
  color: #a99e96;
  line-height: 1.7;
}

.accepted-success-box {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255, 208, 0, .12);
  border: 1px solid rgba(255, 208, 0, .35);
  color: #e0d7cf;
  padding: 14px;
  border-radius: 10px;
  text-align: left;
  margin-bottom: 20px;
}

.accepted-success-icon {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffd000;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}


/* =====================================================
   CHAT
===================================================== */

.consultation-page-ongoing {
  min-height: calc(100vh - 80px);
}

.chat-consultation-page {
  width: min(100%, 850px);
  margin: 0 auto;
  min-height: calc(100vh - 80px);
  background: #11100f;
  display: flex;
  flex-direction: column;
}

.chat-header {
  min-height: 76px;
  background: #201713;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 18px;
}

.chat-back-button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.chat-astrologer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #3a2c25;
  border: 2px solid #ffd000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  position: relative;
}

.chat-avatar span {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  background: #20d45b;
  border-radius: 50%;
  border: 2px solid #201713;
}

.chat-astrologer strong {
  display: block;
  color: #fff;
  font-size: 15px;
}

.chat-astrologer small {
  display: block;
  color: #948a83;
  font-size: 12px;
  margin-top: 3px;
}

.chat-timer {
  text-align: right;
}

.chat-timer strong {
  color: #ff3f3f;
  display: block;
}

.chat-timer small {
  color: #d6b9b9;
  font-size: 11px;
}


/* =====================================================
   CHAT BODY
===================================================== */

.chat-body {
  flex: 1;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(255, 208, 0, .08),
      transparent 25%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(255, 208, 0, .05),
      transparent 25%
    ),
    #100e0d;
}

.chat-background-pattern {
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image:
    radial-gradient(
      circle,
      rgba(255,208,0,.25) 1px,
      transparent 1px
    );
  background-size: 60px 60px;
}

.chat-messages {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
}

.chat-message-row {
  display: flex;
  margin-bottom: 12px;
}

.message-mine {
  justify-content: flex-end;
}

.message-other {
  justify-content: flex-start;
}

.chat-message {
  max-width: 72%;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.45;
}

.chat-message-mine {
  background: #ffd000;
  color: #16110b;
  border-bottom-right-radius: 4px;
}

.chat-message-other {
  background: #2c2420;
  color: #f3eeee;
  border-bottom-left-radius: 4px;
}

/* Image/voice messages read oddly with the same solid bubble fill +
   padding plain text gets — the fill shows as an ill-fitting colored
   box around the media instead of looking like a real chat image/
   voice message. Drop the bubble chrome for these, let the rounded
   image/audio player be the message itself. */
.chat-message-media {
  background: transparent;
  padding: 0;
}

.chat-message small {
  display: block;
  font-size: 9px;
  opacity: .55;
  text-align: right;
  margin-top: 4px;
}


/* =====================================================
   CHAT INPUT
===================================================== */

.chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: #161311;
}

.chat-add-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #403731;
  background: #2b2420;
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}

.chat-input-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input-form input {
  flex: 1;
  min-height: 44px;
  border-radius: 24px;
  border: 1px solid #44372f;
  background: #2a211e;
  color: #fff;
  padding: 0 16px;
  outline: none;
}

.chat-input-form input::placeholder {
  color: #8b817a;
}

.chat-send-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #ffd000;
  color: #16110b;
  font-size: 24px;
  cursor: pointer;
}

.chat-send-button:disabled {
  opacity: .4;
}

.chat-dictation-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid #44372f;
  border-radius: 50%;
  background: #2a211e;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.chat-dictation-btn.active {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  animation: chat-recording-pulse 1.2s ease-in-out infinite;
}

.chat-recording-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 24px;
  border: 1px solid #44372f;
  background: #2a211e;
  color: #fff;
  padding: 0 16px;
}

.chat-recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: chat-recording-pulse 1.2s ease-in-out infinite;
}

@keyframes chat-recording-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.chat-message-image {
  display: block;
  max-width: 220px;
  max-height: 220px;
  border-radius: 10px;
  object-fit: cover;
}

.chat-message-audio {
  display: block;
  max-width: 240px;
  height: 40px;
}


/* =====================================================
   END
===================================================== */

.chat-end-wrapper {
  background: #190805;
  border-top: 1px solid rgba(255,0,0,.25);
  padding: 10px;
  text-align: center;
}

.chat-end-button {
  border: 0;
  background: transparent;
  color: #ff3838;
  font-weight: 700;
  cursor: pointer;
}


/* =====================================================
   MODAL OVERLAY
===================================================== */

.consultation-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.end-chat-modal,
.chat-review-modal {
  width: min(100%, 520px);
  background: #2d2420;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 28px 28px 0 0;
  padding: 28px 20px 25px;
  position: relative;
  text-align: center;
  animation: modalUp .25s ease;
}

@keyframes modalUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.modal-close-button {
  position: absolute;
  right: 20px;
  top: 18px;
  border: 0;
  background: transparent;
  color: #827870;
  font-size: 26px;
  cursor: pointer;
}

.end-chat-warning-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 2px solid #ffd000;
  color: #ffd000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  font-weight: 800;
}

.end-chat-modal h2,
.chat-review-modal h2 {
  color: #fff;
  font-size: 21px;
  margin-bottom: 10px;
}

.end-chat-modal p {
  color: #a79c94;
  margin: 5px 0;
}

.modal-subtext {
  font-size: 13px;
}

.end-chat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 25px;
}

.end-chat-cancel,
.end-chat-confirm {
  min-height: 46px;
  border-radius: 5px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

.end-chat-cancel {
  background: #8c846e;
  color: #fff;
}

.end-chat-confirm {
  background: #ffd000;
  color: #100d0a;
}


/* =====================================================
   REVIEW
===================================================== */

.review-chat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 15px;
  border-radius: 10px;
  background: #ffd000;
  color: #17120d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-description {
  color: #9d9188;
  font-size: 14px;
}

.review-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 3px;
}

.review-star {
  border: 0;
  background: transparent;
  color: #817a65;
  font-size: 27px;
  cursor: pointer;
}

.review-star.active {
  color: #ffd000;
}

.review-rating-label {
  color: #978b83;
  font-size: 12px;
  margin-bottom: 15px;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-bottom: 15px;
}

.review-tag {
  background: #302923;
  color: #d0c7c0;
  border: 1px solid #4b4038;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
}

.review-tag.selected {
  background: #514617;
  border-color: #b59a00;
  color: #fff;
}

.review-textarea {
  width: 100%;
  min-height: 65px;
  resize: vertical;
  border: 0;
  border-radius: 7px;
  background: #150b08;
  color: #fff;
  padding: 12px;
  outline: none;
  margin-bottom: 12px;
}

.review-textarea::placeholder {
  color: #80756e;
}

.review-submit-button {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 5px;
  background: #ffd000;
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.review-submit-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.review-skip-button {
  border: 0;
  background: transparent;
  color: #897e76;
  margin-top: 10px;
  cursor: pointer;
}

.review-error {
  color: #ff6b6b;
  font-size: 12px;
  margin-bottom: 10px;
}

.review-success {
  padding: 20px 5px;
}

.review-success-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #ffd000;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 35px;
  font-weight: 800;
  margin: 0 auto 15px;
}


/* =====================================================
   ATTACHMENT SHEET
===================================================== */

.attachment-overlay {
  align-items: flex-end;
}

.attachment-sheet {
  width: min(100%, 520px);
  background: #2d2420;
  border-radius: 22px 22px 0 0;
  padding: 20px 16px 25px;
  animation: modalUp .25s ease;
}

.attachment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.attachment-header h3 {
  color: #fff;
  font-size: 17px;
  margin: 0;
}

.attachment-header p {
  color: #8f857d;
  font-size: 11px;
  margin: 4px 0 0;
}

.attachment-header button {
  border: 0;
  background: transparent;
  color: #9a9089;
  font-size: 22px;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.attachment-option {
  min-height: 90px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid #403630;
  background: #28211d;
  padding: 13px;
  cursor: pointer;
}

.attachment-option:hover {
  border-color: #ffd000;
}

.attachment-option:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.attachment-option:disabled:hover {
  border-color: #403630;
}

.attachment-link-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.attachment-link-form input {
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #403630;
  background: #28211d;
  color: #fff;
  font-size: 14px;
}

.attachment-link-form input:focus {
  outline: none;
  border-color: #ffd000;
}

.attachment-link-actions {
  display: flex;
  gap: 10px;
}

.attachment-link-actions button {
  flex: 1;
}

.chat-message-link {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
  word-break: break-all;
}

.attachment-icon {
  display: block;
  color: #ffd000;
  font-size: 18px;
  margin-bottom: 7px;
}

.attachment-option strong {
  display: block;
  color: #fff;
  font-size: 13px;
}

.attachment-option small {
  display: block;
  color: #827870;
  font-size: 10px;
  margin-top: 3px;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 576px) {

  .consultation-state-card {
    margin-top: 10px;
    padding: 35px 18px;
    border-radius: 18px;
  }

  .consultation-state-title {
    font-size: 21px;
  }

  .chat-consultation-page {
    min-height: calc(100vh - 70px);
  }

  .chat-body {
    min-height: calc(100vh - 220px);
  }

  .chat-message {
    max-width: 82%;
    font-size: 14px;
  }

  .chat-header {
    padding: 10px 12px;
  }

  .chat-timer small {
    display: none;
  }

  .end-chat-modal,
  .chat-review-modal {
    padding: 28px 15px 22px;
  }

  .review-tags {
    gap: 5px;
  }

  .review-tag {
    font-size: 11px;
    padding: 6px 8px;
  }
}