:root {
  --header-text-color: #485C6E;
  --border-color: #F1F1F1;
}

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

.content-container {
  background-color: white;
  border: 1px solid var(--border-color);
  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: 2px;
  margin: 0.5rem;
}

.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;
}

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

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

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

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

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

.action-btns {
  height: 2.3125rem;
}

.header-action-btns {
  display: flex;
  gap: 0.5rem;
  height: 2.25rem;
}

.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;
  cursor: pointer;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--color-primary-dark);
}

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

.btn-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;
}

.btn-secondary {
  border: 1px solid #F1F1F1;
  box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.12);
  width: 2.25rem;
  height: 2.25rem;
  background-color: white;
  color: #485C6E;
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 0.375rem;
}

/* Hover state */
.btn-secondary:hover:not(:disabled) {
  background-color: #F9FAFB;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
  border-color: #E5E7EB;
}

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

/* ==========================================================================
   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);
  }
}

/* ==========================================================================
   INPUT FIELDS
   ========================================================================== */
.field-group {
    display: flex;
    flex-direction: column;
}

.field-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-grey-700);
    margin-bottom: 6px;
}

.field-label .optional {
    font-weight: 400;
    color: var(--color-grey-300);
}

.field-input {
    padding: 10px 12px;
    max-height: 2.315rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
}

/* ==========================================================================
   INPUT TEXTAREA LIMIT
   ========================================================================== */

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

#email-description-textarea { 
  min-height: 140px; 
  resize: vertical;  
}

.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 !important;
  border-color: #f59e0b !important;
}

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

.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;
}


/* ==========================================================================
   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.82rem;
    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;
}



/* ==========================================================================
   EMAIL CONFIGURATION DROPDOWNS
   ========================================================================== */
.email-configuration-dropdowns-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.8rem;
    width: 100%;
    margin-bottom: 1rem;
}

#email-tone-dropdown-container, 
#email-intent-dropdown-container, 
#email-capitalization-dropdown-container {
  min-height: 40px;
  width: 100%;
}

#subject-lines-count-progressbar {
  max-height: 48px;
}


/* ==========================================================================
   EMAIL OPTIONS SLIDING TOGGLES (Updated from checkboxes)
   ========================================================================== */

.email-options-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

.email-options-container .form-label {
    color: #374151;
    font-weight: 600;
    margin-bottom: 0;
    margin-right: 1rem;
    white-space: nowrap;
}

/* Updated to display toggle switches side by side */
.email-options-container .d-flex.flex-column {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.email-toggle-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    flex-direction: row;
    margin-bottom: 0;
    margin-right: 2rem;
}

.email-toggle-container:last-child {
    margin-right: 0;
}

.email-toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    margin: 0;
}

.email-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.email-toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    border-radius: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.email-toggle-label:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.email-toggle-input:checked + .email-toggle-label {
    background: linear-gradient(135deg, var(--color-primary-light, #265BAA) 0%, var(--color-primary-dark, #2563eb) 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.email-toggle-input:focus + .email-toggle-label {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.email-toggle-input:checked + .email-toggle-label:before {
    transform: translateX(20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hover effects */
.email-toggle-label:hover {
    background-color: #cbd5e1;
    transform: scale(1.02);
}

.email-toggle-input:checked + .email-toggle-label:hover {
    background: linear-gradient(135deg, var(--color-primary-dark, #2563eb) 0%, #1d4ed8 100%);
}

/* Active state */
.email-toggle-input:active + .email-toggle-label:before {
    width: 18px;
}

/* Toggle label text - Updated to match other form labels */
.email-toggle-container .toggle-text {
    font-size: 14px;
    font-weight: 700;
    color: #757682;
    margin: 0;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.email-toggle-container:hover .toggle-text {
    color: #1f2937;
}

/* Responsive: Stack vertically on small screens */
@media (max-width: 479px) {
    .email-options-container .d-flex.flex-column {
        flex-direction: column !important;
        gap: 1rem;
    }
}

/*==========================================================================
  SUBJECT LINE CARDS
  ========================================================================== */
/* Container Styles */
#generated-output-result {
    height: 100%;
    overflow-y: auto;
    flex-direction: column;
}

#generated-output-result {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

/* Subject Line Card Styles */
.subject-line-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;
    flex-direction: column;
}

.subject-line-card:hover {
    border-color: #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Subject Line Header Styles */
.subject-line-header {
    border-bottom: 2px solid #F1F1F1;
    padding-bottom: 0.75rem;
}

.subject-line-number {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-505050);
    letter-spacing: 0.5px;
    background: #F8F9FA;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #E9ECEF;
}

/* Subject Line Content Styles */
.subject-line-content {
    padding-top: 0.75rem;
}

.subject-line-text {
    font-size: 1rem;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.preheader-text {
    font-size: 1rem;
    color: #4B5563;
    line-height: 1.6;
}

.subject-line-text strong,
.preheader-text strong {
    color: #374151;
    font-weight: 600;
}

.subject-line-stats {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #F1F1F1;
}

.subject-line-stats small {
    text-align: right;
}

/* Copy Button Styles */
.copy-btn {
    background: transparent;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.copy-btn:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Character Count Color Coding */
.text-success {
    color: #059669 !important;
}

.text-warning {
    color: #d97706 !important;
}

.text-info {
    color: #0284c7 !important;
}

.text-muted {
    color: #6b7280 !important;
}

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

/* Small Mobiles */
@media (max-width: 479px) {
  .email-configuration-dropdowns-container {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .subject-line-card {
    padding: 1rem 0.875rem;
  }
  
  .subject-text,
  .preheader-text-content {
    display: block;
    margin-left: 0;
    margin-top: 0.25rem;
  }
}

/* Mobile Only (0px to 767px) */
@media (max-width: 767px) {
  /* Hiding scrollbar for mobile devices for output panel */
  #generated-output-result {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;     /* Firefox */
  }
  #generated-output-result::-webkit-scrollbar {
    display: none !important;             /* Chrome, Safari, Opera */
  }
  
  .email-configuration-dropdowns-container {
    grid-template-columns: 1fr;
  }
}

/* Tablet and Up */
@media (min-width: 768px) {
  .email-configuration-dropdowns-container {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .separator {
    display: block;
  }

  .input-action-btns-container {
    flex-direction: row;
  }
  
  .email-configuration-dropdowns-container {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 768px) and (min-height: 1024px) {
  /* Target tablet portrait */
}

/* Large Desktop and Up */
@media (min-width: 1280px) {
  /* Large desktop and larger */
}

/* =======================
   ORIENTATION BREAKPOINTS
   ======================= */

/* Portrait orientation */
@media (orientation: portrait) {
  /* Portrait mode styles */
}

/* Landscape orientation */
@media (orientation: landscape) {
  /* Landscape mode styles */
}

/* Mobile landscape specifically */
@media (max-width: 767px) and (orientation: landscape) {
  /* Mobile in landscape */
}