/* ========================================
   COMPONENT STYLES
   ======================================== */

/* ========================================
   FORM SUCCESS MESSAGE STYLES
   ======================================== */

.form-success-message {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.form-success-message .success-icon {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: var(--spacing-md);
}

.form-success-message .success-icon i {
  display: block;
}

.form-success-message h3 {
  color: #155724;
  margin-bottom: var(--spacing-sm);
  font-size: 1.5rem;
}

.form-success-message p {
  color: #155724;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

/* ========================================
   TOP BAR
   ======================================== */

.top-bar {
  background: var(--background-light);
  color: var(--text-dark);
  padding: var(--spacing-xs) 0;
  font-size: var(--font-size-small);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
}

.top-bar::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #d4d0c4; /* Darker beige color */
}

.top-bar-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding-desktop);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Social Media Links */
.social-links {
  display: flex;
  gap: var(--spacing-xs);
}

.social-links a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.social-links a i {
  font-size: var(--font-size-small);
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

/* Language label removed */

.language-options {
  display: flex;
  gap: var(--spacing-xs);
}

.language-link {
  color: var(--text-dark);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.1);
}

.language-link:hover {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-dark);
}

.language-link.active {
  background: var(--primary-brand);
  color: var(--text-white);
  font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .top-bar-content {
    padding: 0 var(--page-padding-tablet);
  }
}

@media (max-width: 768px) {
  .top-bar {
    padding: var(--spacing-xs) 0;
  }
  
  .top-bar-content {
    padding: 0 var(--page-padding-mobile);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xs);
  }
  
  .social-links {
    order: 1;
  }
  
  .language-switcher {
    order: 2;
  }
  
  /* Language label removed */
}

@media (max-width: 480px) {
  .language-link {
    padding: 8px 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .social-links a {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
  
  .button {
    min-height: 44px;
    padding: 12px 16px;
  }
}

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

.button, button, input[type="submit"] {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: var(--line-height-base);
  text-align: center;
  text-decoration: none;
  border: 2px solid var(--primary-brand);
  border-radius: 8px;
  background-color: var(--primary-brand);
  color: var(--text-white);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.button:hover, button:hover, input[type="submit"]:hover {
  background-color: var(--background-light);
  border-color: var(--background-light);
  color: var(--text-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-light);
}

.button:active, button:active, input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}

.button:focus, button:focus, input[type="submit"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.2);
}

/* Button Variants */
.button.bordered, button.bordered, input.bordered[type="submit"] {
  background-color: transparent;
  color: var(--text-white);
  border-color: var(--text-white);
}

.button.bordered:hover, button.bordered:hover, input.bordered[type="submit"]:hover {
  background-color: var(--background-light);
  color: var(--text-dark);
  border-color: var(--background-light);
}

.button.white, button.white, input.white[type="submit"] {
  background-color: var(--background-white);
  border-color: var(--background-white);
  color: var(--primary-brand);
}

.button.white:hover, button.white:hover, input.white[type="submit"]:hover {
  background-color: var(--background-grey);
  border-color: var(--background-grey);
  color: var(--primary-brand);
}

.button.large, button.large, input.large[type="submit"] {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-large);
}

.button.small, button.small, input.small[type="submit"] {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-small);
}

/* Button Groups */
.button-group {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.button-group .button {
  margin: 0;
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: var(--spacing-sm);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-dark);
  background-color: var(--background-white);
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-brand);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.form-control:invalid {
  border-color: #dc3545;
}

.form-control.error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control.success {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-control:valid {
  border-color: #28a745;
}

/* Form Success Message Animation */
.form-success-message {
  animation: slideInUp 0.5s ease-out;
  transform: translateY(0);
  opacity: 1;
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Loading Button State */
.submit-btn:disabled,
button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Form Input Types */
input[type="text"], input[type="email"], input[type="password"], 
input[type="tel"], input[type="url"], input[type="number"] {
  @extend .form-control;
}

textarea {
  @extend .form-control;
  min-height: 100px;
  resize: vertical;
}

select {
  @extend .form-control;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Checkboxes and Radio Buttons */
.form-check {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.form-check-input {
  margin-right: var(--spacing-sm);
  width: 1.25rem;
  height: 1.25rem;
}

.form-check-label {
  margin: 0;
  font-weight: normal;
}

/* Form Validation */
.form-error {
  color: #dc3545;
  font-size: var(--font-size-small);
  margin-top: var(--spacing-xs);
}

.form-success {
  color: #28a745;
  font-size: var(--font-size-small);
  margin-top: var(--spacing-xs);
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background-color: var(--background-white);
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-medium);
}

.card-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--background-grey);
  background-color: var(--background-light);
}

.card-body {
  padding: var(--spacing-lg);
}

.card-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--background-grey);
  background-color: var(--background-light);
}

.card-title {
  margin: 0 0 var(--spacing-sm) 0;
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--primary-brand);
}

.card-text {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--text-dark);
  line-height: var(--line-height-relaxed);
}

.card-link {
  color: var(--primary-brand);
  text-decoration: none;
  font-weight: 500;
}

.card-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* ========================================
   NAVIGATION COMPONENTS
   ======================================== */

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0 0 var(--spacing-lg) 0;
  padding: 0;
  font-size: var(--font-size-small);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child):after {
  content: '/';
  margin: 0 var(--spacing-sm);
  color: var(--accent-secondary);
}

.breadcrumb a {
  color: var(--primary-brand);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: var(--spacing-xl) 0;
  padding: 0;
}

.pagination li {
  margin: 0 var(--spacing-xs);
}

.pagination a,
.pagination span {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--background-grey);
  border-radius: 8px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination a:hover {
  background-color: var(--primary-brand);
  color: var(--text-white);
  border-color: var(--primary-brand);
}

.pagination .current {
  background-color: var(--primary-brand);
  color: var(--text-white);
  border-color: var(--primary-brand);
}

/* ========================================
   MEDIA COMPONENTS
   ======================================== */

/* Images */
.img-responsive {
  max-width: 100%;
  height: auto;
}

.img-rounded {
  border-radius: 8px;
}

.img-circle {
  border-radius: 50%;
}

.img-thumbnail {
  padding: 0.25rem;
  background-color: var(--background-white);
  border: 1px solid var(--background-grey);
  border-radius: 8px;
}

/* Video */
.video-responsive {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-responsive iframe,
.video-responsive video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ========================================
   ALERT COMPONENTS
   ======================================== */

.alert {
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  border: 1px solid transparent;
  border-radius: 8px;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeaa7;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

/* ========================================
   BADGE COMPONENTS
   ======================================== */

.badge {
  display: inline-block;
  padding: 0.25em 0.5em;
  font-size: var(--font-size-small);
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 8px;
}

.badge-primary {
  color: var(--text-white);
  background-color: var(--primary-brand);
}

.badge-secondary {
  color: var(--text-white);
  background-color: var(--accent-secondary);
}

.badge-success {
  color: var(--text-white);
  background-color: #28a745;
}

.badge-danger {
  color: var(--text-white);
  background-color: #dc3545;
}

.badge-warning {
  color: var(--text-dark);
  background-color: #ffc107;
}

.badge-info {
  color: var(--text-white);
  background-color: #17a2b8;
}

/* ========================================
   PROGRESS COMPONENTS
   ======================================== */

.progress {
  display: flex;
  height: 1rem;
  overflow: hidden;
  font-size: var(--font-size-small);
  background-color: var(--background-grey);
  border-radius: 8px;
}

.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text-white);
  text-align: center;
  white-space: nowrap;
  background-color: var(--primary-brand);
  transition: width var(--transition-normal);
}

.progress-bar-striped {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem;
}

/* ========================================
   TABLES
   ======================================== */

.table {
  width: 100%;
  margin-bottom: var(--spacing-lg);
  color: var(--text-dark);
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--spacing-sm);
  vertical-align: top;
  border-top: 1px solid var(--background-grey);
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--background-grey);
  background-color: var(--background-light);
  font-weight: 600;
}

.table tbody tr:hover {
  background-color: var(--background-light);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--background-light);
}

.table-bordered {
  border: 1px solid var(--background-grey);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--background-grey);
}

/* ========================================
   MODAL COMPONENTS
   ======================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: var(--spacing-lg);
  pointer-events: none;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: var(--background-white);
  border: 1px solid var(--background-grey);
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--background-grey);
}

.modal-title {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: 600;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: var(--spacing-lg);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--spacing-lg);
  border-top: 1px solid var(--background-grey);
  gap: var(--spacing-sm);
}

/* ========================================
   TOOLTIP COMPONENTS
   ======================================== */

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: var(--text-dark);
  color: var(--text-white);
  text-align: center;
  border-radius: 8px;
  padding: var(--spacing-xs);
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  font-size: var(--font-size-small);
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* ========================================
   LOADING COMPONENTS
   ======================================== */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--background-grey);
  border-radius: 50%;
  border-top-color: var(--primary-brand);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-xl);
}

.loading-text {
  margin-left: var(--spacing-sm);
  color: var(--text-dark);
}

/* ========================================
   COOKIE BANNER
   ======================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--background-white);
  border-top: 1px solid var(--background-grey);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: var(--spacing-lg);
  display: none;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

.cookie-banner-text {
  flex: 1;
}

.cookie-banner-text h4 {
  margin: 0 0 var(--spacing-xs) 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-dark);
}

.cookie-banner-text p {
  margin: 0;
  font-size: var(--font-size-base);
  color: var(--text-dark);
  line-height: var(--line-height-base);
}

.cookie-banner-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.cookie-banner-actions .button {
  white-space: nowrap;
}

.cookie-banner-actions .button.bordered {
  background-color: transparent !important;
  color: var(--text-dark) !important;
  border-color: var(--text-dark) !important;
  border: 2px solid var(--text-dark) !important;
}

.cookie-banner-actions .button.bordered:hover {
  background-color: var(--text-dark) !important;
  color: var(--background-white) !important;
  border-color: var(--text-dark) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .cookie-banner {
    padding: var(--spacing-md);
  }
  
  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  .cookie-banner-actions {
    width: 100%;
    justify-content: center;
  }
  
  .cookie-banner-actions .button {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cookie-banner-actions {
    flex-direction: column;
  }
  
  .cookie-banner-actions .button {
    width: 100%;
  }
}
