/* ==========================================================================
   FONT CONFIGURATION
   ========================================================================== */

body {
  font-family:
    "Satoshi",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

/* ==========================================================================
   MAIN LAYOUT STRUCTURE
   ========================================================================== */

.main-container {
  padding: 0;
}

.main-content-wrapper {
  padding: 1.5rem;
}

.content-container {
  background-color: white;
  border: 1px solid #f1f1f1;
  border-radius: 12px;
  box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.12);
  overflow: visible;
}

.header-title {
  font-size: clamp(1.5rem, 2vw + 1rem, 2rem);
  font-weight: 700;
  color: var(--header-text-color);
}

.header-desc {
  font-size: clamp(0.875rem, 1vw + 0.25rem, 1rem);
  font-weight: 400;
  color: var(--header-text-color);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 500px;
}

.separator {
  background-color: #f1f1f1;
  margin: auto;
  height: 95%;
  display: none;
  width: 0.15rem;
  margin: 0.5;
}

/* ==========================================================================
   SECTION LAYOUTS
   ========================================================================== */

.input-section,
.output-section {
  padding: 0.5rem;
  border: none;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-505050);
  margin-bottom: 1rem;
}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */

.form-label {
  font-size: 14px;
  font-weight: 700;
  color: #757682;
  margin-bottom: 0.4rem;
}

/* Show '*' mark in red for required labels */
.form-label.required::after {
  content: " *";
  color: red;
  font-weight: 700;
}

/* Show (Optional) in gray for optional labels */
.form-label.optional::after {
  content: " (Optional)";
  font-weight: 400;
  color: #a0a0a0;
}

/* .form-control,
.form-select {
  background-color: red;
  border: 1px solid red;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
} */

/* .form-control:focus,
.form-select:focus {
  border-color: red;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
} */

.input-group-custom {
  position: relative;
}

#pharase-description-textarea {
  min-height: 80px;
  max-height: 180px;
}

.char-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 12px;
  color: #6b7280;
  background: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.char-limit-warning {
  color: #f59e0b;
}

.char-limit-error {
  color: #ef4444;
}

/* ==========================================================================
   DROPDOWN ELEMENTS
   NOTE: We will remove this dropdown if we have in main tool (parapharser), 
   bcoz Will be using same dropdown style universally 
   ========================================================================== */

.acronym-custom-dropdown {
  position: relative;
  display: inline-block;
}

.acronym-custom-dropdown-toggle {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 15px 8px 12px;
  font-size: 14px;
  color: var(--color-text-505050);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 140px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  font-weight: 500;
}

.acronym-custom-dropdown-toggle:hover {
  border-color: #265baa;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.acronym-custom-dropdown-toggle:focus {
  outline: none;
  border-color: #265baa;
  /* box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1); */
}

.acronym-custom-dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #8d8d8d;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.acronym-custom-dropdown.open .acronym-custom-dropdown-arrow {
  transform: rotate(180deg);
}

.acronym-custom-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.acronym-custom-dropdown.open .acronym-custom-dropdown-menu {
  display: block;
}

.acronym-custom-dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-505050);
  font-weight: 400;
  transition: background-color 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.acronym-custom-dropdown-item:hover {
  background-color: #f8f9fa;
}

.acronym-custom-dropdown-item.selected {
  position: relative;
  padding-right: 35px;
  font-weight: 700;
  /* Add extra padding for icon space */
}

.acronym-custom-dropdown-item .check-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: none;
}

.acronym-custom-dropdown-item.selected .check-icon {
  display: block;
}

.acronym-custom-dropdown-item .check-icon svg {
  width: 100%;
  height: 100%;
  fill: #4285f4;
}

.acronym-custom-dropdown-item:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.acronym-custom-dropdown-item:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Hide the original select */
.acronym-custom-dropdown .form-select {
  display: none;
}

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

.action-btns {
  height: 2.3125rem;
  /* display: flex; */
}

.btn-primary {
  background: var(--color-primary-light);
  border: none;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex: 1;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--color-primary-light);
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-secondary {
  border: 1px solid #f1f1f1;
  box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.12);
  width: 2.25rem;
  height: auto;
  background-color: white;
  color: #485c6e;
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 0.375rem;
  /* optional: subtle rounding */
}

/* Hover state */
.btn-secondary:hover:not(:disabled) {
  background-color: #f9fafb;
  /* light gray */
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
  border-color: #e5e7eb;
  /* slightly darker border on hover */
}

/* Disabled state */
.btn-secondary:disabled {
  background-color: #f5f5f5;
  color: #a1a1aa;
  border-color: #e5e5e5;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.copy-btn {
  background: transparent;
  border: 1px solid #f1f1f1;
  border-radius: 6px;
  padding: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

.copy-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.copy-btn .bi {
  transition: opacity 0.2s ease;
}

.copy-btn .bi-check {
  font-size: 18px;
}

.result-action-btn {
  border: 1px solid #f1f1f1;
}

.result-action-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

/* ==========================================================================
   QUICK EXAMPLES & SAMPLE PILLS
   ========================================================================== */

.quick-examples {
  border-radius: 8px;
  margin-top: 1rem;
}

.quick-examples h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #757682;
  margin-bottom: 0.75rem;
}

.sample-pill-container {
  background-color: #fbfbfd;
  border-radius: 8px;
  padding: 1rem;
}

.sample-pill {
  background: #ffffff;
  border: 1px solid #d3dce0;
  color: #717171;
  padding: 0.375rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  margin: 0.125rem;
}

.sample-pill:hover {
  background: #ffffffeb;
  color: #334155;
  border-color: #94a3b8;
}

/* ==========================================================================
   LOADING SPINNER
   ========================================================================== */

.generate-loading-spinner {
  border: 1px solid #f3f4f6;
  border-top: 1px solid var(--color-primary-light);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   RESULTS SECTION
   ========================================================================== */

#acronym-coutput-container {
  height: 100%;
  overflow-y: auto;
  flex-direction: column;
}

#acronym-coutput-container {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.acronym-card {
  background: #fbfbfd;
  border: 1px solid #f1f1f1;
  border-radius: 12px;
  padding: 1.5rem 1.125rem;
  margin-bottom: 0.7rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acronym-card:hover {
}

.acronym-content {
}

.acronym-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-505050);
  letter-spacing: 0.5px;
}

.acronym-full {
  font-size: 0.85rem;
  font-weight: 500;
  color: #585964;
  margin: 0;
  line-height: 1.4;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.empty-state {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 2rem 1rem;
  text-align: center;
  color: #bebebe;
}

.empty-state i {
  font-size: 3rem;
  color: #9ca3af;
}

.empty-state h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #757682;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
  color: #757682;
  margin: 0;
}

/* ==========================================================================
   HEADER ACTIONS
   ========================================================================== */

.header-actions {
  display: flex;
  gap: 0.5rem;
}

/* ==========================================================================
   PROGRESS & BADGES
   ========================================================================== */

.progress-ring {
  width: 40px;
  height: 40px;
}

.progress-ring-circle {
  stroke: #10b981;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}

.attempts-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: "Satoshi", sans-serif;
}

/* ==========================================================================
   MESSAGE BOX
   ========================================================================== */

#messageBox {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  width: auto;
}

/* ==========================================================================
   MODAL STYLES
   ========================================================================== */

.custom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.custom-modal.closing {
  opacity: 0;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: translateY(-20px) scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal.show .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.custom-modal.closing .modal-content {
  transform: translateY(-20px) scale(0.95);
  opacity: 0;
}

.modal-header {
  padding: 24px 24px 0;
  position: relative;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #f1f5f9;
  color: #334155;
}

.modal-body {
  padding: 20px 24px;
}

.modal-description {
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal-btn-secondary {
  background: white;
  color: #64748b;
  border: 2px solid #e2e8f0;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn-secondary:hover {
  border-color: #cbd5e1;
  color: #475569;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN - BREAKPOINTS
   ========================================================================== */

/* Tablet and Desktop (min-width: 768px) */
@media (min-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr 1rem 1fr;
  }

  .separator {
    display: block;
  }

  /* .acronym-dropdown {
    flex-direction: row;
  } */
}

/* Large Desktop (max-width: 1199.98px) */
@media (max-width: 1199.98px) {
  /* .main-content-wrapper {
    padding: 1rem;
  } */

  /* .acronym-custom-dropdown-toggle {
    min-width: 135px;
  } */
}

/* Medium Desktop (max-width: 991.98px) */
@media (max-width: 991.98px) {
  /* .main-content-wrapper {
    padding: 0.875rem;
  } */


  .generate-btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.8125rem;
  }

  .section-title {
    font-size: 1.125rem;
  }

  /* .form-label {
    font-size: 0.8125rem;
  } */

  .empty-state h4 {
    font-size: 1rem;
  }

  .empty-state p {
    font-size: 0.8125rem;
  }

  .quick-examples h4 {
    font-size: 0.9375rem;
  }

  /* .form-label {
    font-size: 0.8125rem;
  } */

  .empty-state h4 {
    font-size: 1rem;
  }

  .empty-state p {
    font-size: 0.8125rem;
  }

  .quick-examples h4 {
    font-size: 0.9375rem;
  }

  /* .acronym-custom-dropdown-toggle {
    min-width: 130px;
  } */
}

/* Tablet (max-width: 767.98px) */
@media (max-width: 767.98px) {
  /* .main-content-wrapper {
    padding: 1rem;
  } */

  .input-section {
    border-bottom: 1px solid #e5e7eb;
  }

  .content-grid {
    min-height: auto;
  }

  .generate-btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.8125rem;
  }

  .section-title {
    font-size: 1.125rem;
  }

  .acronym-card {
    padding: 0.75rem;
    /* flex-direction: column; */
    align-items: flex-start;
    gap: 0.5rem;
  }

  .acronym-content {
    width: 100%;
  }

  .copy-btn {
    align-self: flex-end;
  }

  .header-actions {
    /* flex-direction: column; */
    gap: 0.5rem;
  }

  .sample-pill {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }

  /* .input-group-custom .form-control {
    min-height: 80px;
    max-height: 180px;
    padding-right: 60px;
  }  */

  .char-counter {
    font-size: 11px;
    bottom: 6px;
    right: 8px;
  }

  #messageBox {
    max-width: 95%;
    right: 2.5%;
  }

  .acronym-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
    /* flex-direction: column; */
    gap: 1rem;
    text-align: center;
  }

  /* .acronym-dropdown {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .acronym-custom-dropdown {
    width: 100%;
  }

  .acronym-custom-dropdown-toggle {
    width: 100%;
    min-width: unset;
  } */
}

/* Mobile (max-width: 575.98px) */
@media (max-width: 575.98px) {
  /* .main-content-wrapper {
    padding: 0;
  } */


  .generate-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }

  .section-title {
    font-size: 1rem;
  }

  /* .form-label {
    font-size: 0.75rem;
  } */

  .empty-state h4 {
    font-size: 0.9375rem;
  }

  .empty-state p {
    font-size: 0.75rem;
  }

  .quick-examples h4 {
    font-size: 0.875rem;
  }

  .acronym-card {
    padding: 1rem 0.875rem;
    margin-bottom: 0.625rem;
  }

  .acronym-title {
    font-size: 0.9375rem;
  }

  .acronym-full {
    font-size: 0.8125rem;
    text-align: left;
  }

  .sample-pill {
    font-size: 0.7rem;
    padding: 0.1875rem 0.375rem;
  }

  #pharase-description-textarea {
    min-height: 90px;
    padding-right: 55px;
  }

  .char-counter {
    font-size: 10px;
    bottom: 4px;
    right: 6px;
  }

  .outline-btn.btn-sm {
    padding: 0.25rem 0.375rem;
    font-size: 0.625rem;
  }

  h1 {
    font-size: 1.5rem !important;
  }

  h3 {
    font-size: 1.1rem !important;
  }

  .text-base {
    font-size: 0.9rem !important;
  }
}
