/* Custom styles for InboxTutor landing page */

body {
  font-family: 'MS Sans Serif', 'Microsoft Sans Serif', sans-serif;
}

.margin-bottom {
  margin-bottom: 15px;
}

.margin-top {
  margin-top: 15px;
}

h1, h2, h3 {
  font-weight: bold;
}

.error-box {
  background-color: #ffcccc;
  border: 2px solid #cc0000;
  padding: 10px;
  margin: 10px 0;
  border-radius: 0;
}

.success-box {
  background-color: #ccffcc;
  border: 2px solid #00cc00;
  padding: 10px;
  margin: 10px 0;
  border-radius: 0;
}

/* Loading state */
button[disabled] {
  cursor: wait;
}

/* Make forms more readable */
form label {
  font-size: 13px;
}

form input {
  font-size: 13px;
}

/* Responsive adjustments */
@media (max-width: 920px) {
  .window {
    width: 95% !important;
    height: 90vh !important;
    margin: 10px auto !important;
  }
}

@media (max-width: 600px) {
  .flex-row {
    flex-direction: column !important;
  }
  
  .lowered[style*="width: 200px"] {
    width: 100% !important;
    height: auto !important;
    max-height: 150px;
  }
}

/* Smooth scrolling */
* {
  scrollbar-width: thin;
}

/* Additional spacing helpers */
.gap {
  gap: 8px;
}

.padding {
  padding: 10px;
}

/* Example cards */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.example-card {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.1s ease;
  min-height: 80px;
  background: var(--button-face);
}

.example-card:hover {
  transform: translateY(-2px);
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.example-card:active {
  transform: translateY(0px);
  box-shadow: none;
}

.example-icon {
  font-size: 24px;
  margin-right: 10px;
  flex-shrink: 0;
}

.example-text {
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Responsive grid */
@media (max-width: 920px) {
  .examples-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .examples-grid {
    grid-template-columns: 1fr;
  }
  
  .example-card {
    min-height: 60px;
  }
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-overlay .window {
  animation: slideIn 0.2s ease-out;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
}

@keyframes slideIn {
  from {
    transform: translate(-50%, -45%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* Responsive modal */
@media (max-width: 600px) {
  .modal-overlay .window {
    width: 90% !important;
    max-width: 500px;
  }
}

/* Button alignment helpers */
.justify-space-between {
  justify-content: space-between;
}

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

.align-center {
  align-items: center;
}

/* Attachment buttons */
.attachment-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.attachment-btn {
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  background: var(--button-face);
  /* border: 2px solid; */
  /* border-color: var(--button-highlight) var(--button-shadow) var(--button-shadow) var(--button-highlight); */
}

.attachment-btn:hover {
  background: var(--button-face);
  filter: brightness(1.05);
}

.attachment-btn:active {
  border-color: var(--button-shadow) var(--button-highlight) var(--button-highlight) var(--button-shadow);
}

/* Attachments container */
#attachments-container {
  background: var(--button-face);
}

.attachment-icon {
  position: relative;
  cursor: default;
  margin: 4px;
}

.attachment-icon:hover {
  background: var(--button-highlight);
}

/* Remove button on attachment icons */
.remove-attachment-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  padding: 1px 2px;
  font-size: 11px;
  line-height: 1;
  font-weight: bold;
  background: var(--button-highlight);
  color: black;
  border: 1px solid;
  border-color: var(--button-highlight) var(--button-shadow) var(--button-shadow) var(--button-highlight);
  cursor: pointer;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.15);
}

.remove-attachment-btn:hover {
  background: white;
}

.remove-attachment-btn:active {
  border-color: var(--button-shadow) var(--button-highlight) var(--button-highlight) var(--button-shadow);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.15);
}

/* Icon grid styling for attachments */
.icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  max-width: 100px;
  padding: 8px;
  cursor: pointer;
}

.icon-label {
  margin-top: 4px;
  font-size: 11px;
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
}

/* Responsive attachment buttons */
@media (max-width: 600px) {
  .attachment-buttons {
    gap: 6px;
  }
  
  .attachment-btn {
    padding: 5px 10px;
    font-size: 11px;
  }
}

