/* Components & Widgets (Calculators, Chat Widget, Utilities) */

/* Calculator Styles */
.calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  min-height: 0; /* Prevent scrollbar issues */
  overflow: visible; /* Allow natural content flow */
  height: auto; /* Auto size based on content */
}

.calculator-form {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  min-height: 0; /* Prevent scrollbar issues */
  overflow: visible; /* Allow natural content flow */
  height: auto; /* Auto size based on content */
  max-height: none; /* Remove height constraints */
}

.calculator-form h2 {
  color: var(--brand);
  margin-bottom: 25px;
  font-size: 1.4rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand);
}

.calculate-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--brand) 0%, #ff6b6b 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.calculate-btn:hover {
  transform: translateY(-2px);
}

.results-container {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 15px;
  border-left: 5px solid var(--brand);
}

.results-container h3 {
  color: var(--brand);
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #dee2e6;
}

.result-item:last-child {
  border-bottom: none;
}

.result-value {
  font-weight: 700;
  color: var(--brand);
  font-size: 1.1rem;
}

.tax-breakdown {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #dee2e6;
}

.tax-breakdown h4 {
  color: #333;
  margin-bottom: 15px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
}

.tax-table {
  margin: 20px 0;
  overflow-x: auto;
}

.tax-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.tax-table th,
.tax-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.tax-table th {
  background: var(--brand);
  color: white;
  font-weight: 600;
}

.tax-table tr:hover {
  background: #f8f9fa;
}

.info-section {
  margin-top: 40px;
}

.warning-box {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 20px;
  margin: 25px 0;
}

.warning-box h4 {
  color: #856404;
  margin-bottom: 10px;
}

.warning-box p {
  color: #856404;
  margin: 0;
}

.contact-cta {
  background: linear-gradient(135deg, var(--brand) 0%, #ff6b6b 100%);
  color: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  margin: 30px 0;
}

.contact-cta h3 {
  margin-bottom: 15px;
}

.contact-cta p {
  margin-bottom: 20px;
  opacity: 0.9;
}

.contact-info {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  margin: 25px 0;
}

.contact-info h3 {
  color: var(--brand);
  margin-bottom: 15px;
}

.contact-info a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Responsive Calculator */
@media (max-width: 768px) {
  .calculator-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .tax-table {
    font-size: 0.9rem;
  }
}

/* Utility Classes */
.section{padding:48px 0;color:#0b0b0b}
.hero{
  background:linear-gradient(180deg,#0b0b0b,#121212);
  color:var(--white);
  padding:80px 0;
  text-align: center;
}

.hero .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}
h1{margin:0 0 12px 0;font-size:2rem}
p{margin:0 0 12px 0;line-height:1.6;color:#222}
/* Button styles moved to base.css to avoid conflicts */

/* ===== Chat Widget ===== */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.chat-button {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(41, 128, 185, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  overflow: hidden;
}

.chat-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 229, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-button:active {
  transform: scale(0.95);
  animation: chatButtonPulse 0.6s ease-out;
}

.chat-widget.modal-open .chat-button {
  transform: scale(0.9);
  opacity: 0.7;
}

.chat-icon {
  color: var(--white);
  transition: transform 0.3s ease;
}

.chat-button:hover .chat-icon {
  transform: scale(1.1);
}

.chat-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--brand);
  transform: translate(-50%, -50%);
  animation: chatPulse 2s infinite;
  opacity: 0;
  pointer-events: none;
}

@keyframes chatPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

@keyframes chatButtonPulse {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Chat Modal */
.chat-modal-wrapper {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: transparent !important;
  box-sizing: border-box;
  padding: 20px;
}

.chat-modal-wrapper.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.chat-modal {
  width: 90%;
  max-width: 500px;
  height: auto;
  max-height: 85vh;
  background: #212529;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  filter: none !important;
  backdrop-filter: none !important;
  position: relative;
  z-index: 10002;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  /* Initial state - emerges from chat icon position */
  transform-origin: bottom right;
  transform: scale(0.1) translateX(200px) translateY(200px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-modal-wrapper.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.chat-modal-wrapper.active .chat-modal {
  transform: scale(1) translateX(0) translateY(0);
  opacity: 1;
}

.chat-modal-wrapper.closing .chat-modal {
  transform: scale(0.1) translateX(200px) translateY(200px) !important;
  opacity: 0 !important;
  transition: all 0.3s cubic-bezier(0.6, 0.04, 0.98, 0.335) !important;
}

.chat-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.chat-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.chat-modal-wrapper.closing ~ .chat-backdrop {
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
}

.chat-modal-content {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.chat-header {
  padding: 20px 20px 12px 24px;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #212529;
  color: #ffffff;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.chat-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  color: #ffffff;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.chat-body {
  flex: 1;
  padding: 12px 24px 0;
  overflow-y: auto;
  color: #333;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 0 0 8px 8px;
}

.welcome-text {
  margin: 0 0 28px 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6c757d;
  text-align: left;
  padding: 0;
  background: none;
  border: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-height: 0;
  padding-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 4px;
}

/* Styles για non-floating form elements (checkboxes etc) */
.form-group:not(.floating-label) input,
.form-group:not(.floating-label) textarea {
  padding: 12px 16px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  background: #ffffff;
}

.form-group:not(.floating-label) input:focus,
.form-group:not(.floating-label) textarea:focus {
  outline: none;
  border-color: #0d6efd;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 300px;
  font-family: inherit;
  line-height: 1.5;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ced4da #f8f9fa;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea::-webkit-scrollbar {
  width: 8px;
}

.form-group textarea::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 4px;
}

.form-group textarea::-webkit-scrollbar-thumb {
  background: #ced4da;
  border-radius: 4px;
}

.form-group textarea::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

.checkbox-group {
  margin-top: 8px;
  width: 100%;
  overflow: visible;
  contain: none;
  padding: 8px 0;
}

/* Careers-style checkboxes */
.careers-check {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.careers-check input[type="checkbox"] {
  margin: 0;
  margin-top: 1px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.careers-check .checkmark {
  display: none;
}

.careers-check .text-content {
  color: #1f2937;
  line-height: 1.5;
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.careers-check .text-content a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
}

.form-checkboxes {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 20px;
  position: relative;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  appearance: auto;
  -webkit-appearance: checkbox;
  -moz-appearance: checkbox;
}

.checkmark {
  display: none;
}

.checkbox-label a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.checkbox-label a:hover {
  border-bottom-color: var(--brand);
}

.checkbox-label .text-content {
  flex: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
  max-width: calc(100% - 24px);
  hyphens: auto;
}

.recaptcha-info {
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 12px;
  line-height: 1.4;
  padding: 0;
  border: none;
}

.recaptcha-info a {
  color: #9ca3af;
  text-decoration: underline;
}

.recaptcha-info a:hover {
  color: #6b7280;
}

.form-actions {
  margin-top: auto;
  padding: 16px 0 8px 0;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.submit-btn {
  width: 100%;
  padding: 12px 20px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.submit-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.1rem;
}

.btn-text {
  font-size: 15px;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Responsive για mobile */
@media (max-width: 768px) {
  .chat-modal {
    width: 95%;
    max-width: none;
    max-height: 90vh;
    margin: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  
  .chat-modal-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .chat-header {
    padding: 16px 20px 12px 20px;
  }
  
  .chat-header h3 {
    font-size: 1rem;
  }
  
  .chat-body {
    padding: 16px 20px 20px;
    min-height: 0;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .welcome-text {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  
  /* Floating labels mobile adjustments removed - using main rules instead */
  
  .submit-btn {
    width: 100%;
    min-width: auto;
    padding: 16px 24px;
    font-size: 1rem;
  }
  
  .form-actions {
    justify-content: stretch;
  }
}

@media (max-width: 480px) {
  .chat-modal {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  
  .chat-modal-wrapper {
    padding: 0;
  }
  
  .chat-modal-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .chat-body {
    padding-bottom: 30px;
  }
}

.chat-submit:active {
  transform: translateY(0);
}

/* Scrollbar για chat modal σε mobile */
.chat-modal-content::-webkit-scrollbar {
  width: 6px;
}

.chat-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.chat-modal-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.chat-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .chat-modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  }
}

/* Floating Label Animations για Chat Widget */
.floating-label {
  position: relative;
  margin-bottom: 24px;
}

.floating-label input,
.floating-label textarea {
  width: 100%;
  padding: 16px 16px 6px 16px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  outline: none;
}

.floating-label textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 300px;
  font-family: inherit;
  line-height: 1.5;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ced4da #f8f9fa;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.floating-label label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: #6c757d;
  pointer-events: none;
  transition: all 0.2s ease;
  background: transparent;
  padding: 0;
  z-index: 1;
}

.floating-label textarea + label {
  top: 32px;
  transform: translateY(-50%);
}

/* Active state - label πάνω */
.floating-label input:focus + label,
.floating-label input.has-content + label,
.floating-label textarea:focus + label,
.floating-label textarea.has-content + label {
  top: 0;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #0d6efd;
  font-weight: 500;
  background: #ffffff;
  padding: 0 4px;
}

/* Focus states */
.floating-label input:focus,
.floating-label textarea:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.1);
}

/* Textarea scrollbar styling */
.floating-label textarea::-webkit-scrollbar {
  width: 8px;
}

.floating-label textarea::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 4px;
}

.floating-label textarea::-webkit-scrollbar-thumb {
  background: #ced4da;
  border-radius: 4px;
}

.floating-label textarea::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

.chat-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Prevent body scroll when modal is open */
body.chat-modal-open {
  overflow: hidden;
  position: relative;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .chat-widget {
    bottom: 16px;
    right: 16px;
  }
  
  .chat-button {
    width: 56px;
    height: 56px;
  }
  
  .chat-modal {
    width: 95% !important;
    max-height: 85vh !important;
  }
  
  .chat-header {
    padding: 16px 20px 12px;
  }
  
  .chat-body {
    padding: 20px;
  }
  
  .contact-options {
    flex-direction: column;
    gap: 8px;
  }
  
  .contact-option {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 12px 16px;
  }
}