:root {
  --stone-base: #3e4144;
  --stone-ledge: #2c2e31;
  --stone-shadow: #1b1c1f;
  --stone-highlight: #6f7376;
  --stone-vein: #84878a;
  --etching-light: #d5d7d8;
  --etching-dark: #a3a6a8;
  --text-primary: #f0f1f2;
  --text-secondary: rgba(223, 224, 225, 0.88);
  --text-muted: rgba(203, 205, 206, 0.72);
}

body,
button,
input,
textarea {
  font-family: 'Caudex', 'Spectral', serif;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

body {
  background: radial-gradient(circle at top, #5a5d60 0%, var(--stone-base) 35%, #2b2d30 100%);
  background-attachment: fixed;
}

.messages-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-height: 520px;
      border-radius: 18px;
      background:
        linear-gradient(160deg, rgba(24, 30, 42, 0.94), rgba(12, 16, 24, 0.97)),
        radial-gradient(circle at 18% 22%, rgba(136, 140, 150, 0.12), transparent 70%);
      border: 1px solid rgba(152, 241, 255, 0.24);
      box-shadow: inset 0 0 40px rgba(6, 9, 14, 0.75);
  overflow: hidden;
  position: relative;
}

.messages-wrapper::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cpath d='M8 20l34 44-18 20 44 58-12 32 42 40-6 30 28 36' stroke='%23909192' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3Cpath d='M180 6l16 52-34 42 22 36-10 48 42 38-14 46' stroke='%237a7c7d' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  opacity: 0.35;
  pointer-events: none;
}

.messages-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 55%),
              radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.45), transparent 60%);
  pointer-events: none;
}

.messages-container {
  max-height: 320px;
  overflow-y: auto;
  padding: 1.35rem;
  background: linear-gradient(180deg, rgba(69, 71, 74, 0.95), rgba(52, 53, 56, 0.92));
  border-bottom: 2px solid rgba(22, 23, 24, 0.55);
  backdrop-filter: blur(1px);
}

.messages-container::-webkit-scrollbar {
  width: 8px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(112, 114, 116, 0.85), rgba(78, 80, 82, 0.9));
  border-radius: 6px;
  border: 1px solid rgba(28, 29, 30, 0.8);
}

.messages-container::-webkit-scrollbar-track {
  background: rgba(36, 37, 38, 0.7);
}

.no-messages {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  letter-spacing: 0.12em;
}

.message-item {
  position: relative;
  margin-bottom: 1rem;
  padding: 1.15rem 1.35rem 1.35rem 1.35rem;
  background: linear-gradient(160deg, rgba(88, 90, 92, 0.94), rgba(59, 61, 63, 0.92));
  border-radius: 22px 18px 26px 16px;
  color: var(--text-primary);
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.55),
              inset 0 -4px 10px rgba(255, 255, 255, 0.08);
}

.message-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px 18px 26px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.message-author {
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--text-secondary);
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
}

.message-author.my-message {
  color: var(--etching-light);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.55);
}

.message-author.other-message {
  color: var(--text-secondary);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.55);
}

.message-content {
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
  line-height: 1.6;
}

.message-timestamp {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.message-attachment {
  max-width: 100%;
  max-height: 220px;
  margin-top: 0.75rem;
  border: 2px solid rgba(26, 27, 28, 0.8);
  border-radius: 18px 12px 20px 10px;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.7);
}

.message-attachment-link {
  color: var(--etching-light);
  text-decoration: none;
  display: inline-block;
  margin-top: 0.8rem;
  letter-spacing: 0.12em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.message-attachment-link:hover {
  color: var(--etching-dark);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

.delete-button {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(155deg, rgba(78, 79, 82, 0.95), rgba(46, 47, 50, 0.95));
  border: 2px solid rgba(18, 18, 19, 0.9);
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--etching-light);
  padding: 4px 8px;
  border-radius: 60% 40% 55% 45%;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.08), 0 12px 24px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease, text-shadow 0.2s ease;
}

.delete-button:hover {
  transform: translateY(-1px) scale(1.05);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.75);
  box-shadow: inset 0 3px 6px rgba(255, 255, 255, 0.08), 0 16px 30px rgba(0, 0, 0, 0.85);
}

.new-message-form {
  display: flex;
  align-items: stretch;
  padding: 1.1rem;
  gap: 0.75rem;
  background: linear-gradient(160deg, rgba(74, 76, 79, 0.95), rgba(48, 50, 52, 0.94));
  border-top: 2px solid rgba(18, 19, 20, 0.78) !important;
}

.new-message-form .input-container,
.optimized-input-container {
  display: flex;
  align-items: center;
  flex-grow: 1;
  position: relative;
  gap: 0.65rem;
}

.optimized-textarea,
.new-message-form textarea {
  flex-grow: 1;
  resize: none;
  border-radius: 18px 16px 20px 14px;
  padding: 0.9rem 1rem;
  background: linear-gradient(170deg, rgba(86, 88, 91, 0.95), rgba(58, 60, 62, 0.96));
  color: var(--text-primary);
  border: 2px solid rgba(24, 24, 25, 0.85);
  min-height: 48px;
  max-height: 140px;
  line-height: 1.4;
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.6);
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.optimized-textarea::placeholder,
.new-message-form textarea::placeholder {
  color: rgba(218, 220, 221, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.optimized-textarea:focus,
.new-message-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 26px rgba(0, 0, 0, 0.35);
  outline: none;
}

.file-upload-label {
  cursor: pointer;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 58% 42% 60% 40%;
  background: linear-gradient(160deg, rgba(82, 84, 86, 0.95), rgba(47, 48, 50, 0.95));
  color: var(--etching-light);
  border: 2px solid rgba(18, 19, 20, 0.9);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.09), 0 12px 26px rgba(0, 0, 0, 0.75);
  transition: transform 0.2s ease, box-shadow 0.2s ease, text-shadow 0.2s ease;
}

.file-upload-label:hover {
  transform: translateY(-1px) scale(1.05);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  box-shadow: inset 0 3px 6px rgba(255, 255, 255, 0.08), 0 16px 32px rgba(0, 0, 0, 0.85);
}

.upload-icon {
  pointer-events: none;
}

.new-message-form input[type="file"],
.file-input {
  display: none;
}

.optimized-submit-button,
.new-message-form button {
  background: linear-gradient(165deg, rgba(94, 96, 98, 0.96), rgba(55, 57, 59, 0.96));
  color: var(--etching-light);
  font-size: 0.95em;
  padding: 0.85rem 1.7rem;
  border: 2px solid rgba(22, 22, 24, 0.88);
  border-radius: 24px 18px 20px 16px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.12), inset 0 -5px 0 rgba(0, 0, 0, 0.55), 0 24px 44px rgba(0, 0, 0, 0.78);
  transition: transform 0.2s ease, box-shadow 0.2s ease, text-shadow 0.2s ease;
}

.optimized-submit-button:hover,
.new-message-form button:hover {
  transform: translateY(-2px);
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.75);
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.12), inset 0 -6px 0 rgba(0, 0, 0, 0.58), 0 28px 46px rgba(0, 0, 0, 0.85);
}

.optimized-submit-button:active,
.new-message-form button:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08), inset 0 -3px 0 rgba(0, 0, 0, 0.45), 0 12px 22px rgba(0, 0, 0, 0.7);
}

@media (max-width: 720px) {
  .messages-wrapper {
    max-height: none;
  }

  .messages-container {
    max-height: 260px;
  }

  .new-message-form {
    flex-direction: column;
    align-items: stretch;
  }

  .optimized-input-container {
    flex-direction: column;
    align-items: stretch;
  }

  .file-upload-label {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }

  .optimized-submit-button,
  .new-message-form button {
    width: 100%;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

*= require_tree
