/* Variables CSS - Colores Corporativos */
:root {
  --color-primary: #00B2FF;
  --color-primary-dark: #0099E6;
  --color-primary-light: #33C1FF;
  --color-pink: #FF2EBE;
  --color-pink-dark: #E61E9E;
  --color-pink-light: #FF5DD1;
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-gray-dark: #333333;
  --color-gray: #666666;
  --color-gray-light: #CCCCCC;
  --color-gray-lighter: #F5F5F5;
  --color-gray-bot: #E8E8E8;
  --color-success: #10B981;
  --color-error: #EF4444;
  --color-warning: #F59E0B;
  
  --spacing-unit: 8px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  
  --transition: all 0.3s ease;
}

/* Reset y Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--color-primary);
  color: var(--color-gray-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 32px);
  max-width: 1200px;
  margin: 16px auto;
  background: var(--color-white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius);
  overflow: hidden;
}

@media (max-width: 768px) {
  .app-container {
    margin: 12px;
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
  }
  
  .chat-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
  }
  
  .chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--spacing-unit) * 1);
    box-sizing: border-box;
  }
}

/* Header */
.chat-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-lighter);
  padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 2.5);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  min-height: 100px;
}

.header-content {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2);
  max-width: 100%;
  position: relative;
}

.header-info {
  flex: 0 0 auto;
  min-width: 0;
}

.header-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
  line-height: 1.2;
}

.header-subtitle-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex: 0 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--spacing-unit) * 0.5);
}

.header-subtitle {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.header-description {
  font-size: 14px;
  color: var(--color-primary);
  margin: 0;
  font-weight: 400;
  white-space: nowrap;
}

.language-selector-container {
  flex: 0 0 auto;
  margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .chat-header {
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 1.5);
    min-height: 90px;
    overflow: visible;
    flex-shrink: 0;
  }
  
  .header-content {
    flex-wrap: nowrap;
    justify-content: space-between;
    position: relative;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1);
    min-height: 70px;
  }
  
  .avatar-container {
    flex: 0 0 auto;
    z-index: 2;
    flex-shrink: 0;
  }
  
  .header-info {
    display: none; /* Ocultar "Nuvolcam" en móvil */
  }
  
  .header-title {
    display: none; /* Ocultar título en móvil */
  }
  
  .header-subtitle-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 140px);
    max-width: 300px;
    text-align: center;
    padding: 0 calc(var(--spacing-unit) * 1);
    z-index: 1;
  }
  
  .header-subtitle {
    font-size: 16px;
    font-weight: 700;
    white-space: normal;
    line-height: 1.2;
    margin-bottom: 2px;
    word-wrap: break-word;
  }
  
  .header-description {
    font-size: 9px;
    white-space: normal;
    line-height: 1.3;
    word-wrap: break-word;
  }
  
  .language-selector-container {
    position: absolute;
    top: calc(var(--spacing-unit) * 1);
    right: calc(var(--spacing-unit) * 1);
    z-index: 2;
    flex-shrink: 0;
  }
}

