/* 
 * JobAI - Responsive CSS
 * Da includere in tutti i file HTML: <link rel="stylesheet" href="jobai-responsive.css">
 * Oppure copiare questo contenuto dentro i tag <style> esistenti prima della chiusura </style>
 */

/* ==================== RESPONSIVE DESIGN - TUTTI I FILE ==================== */

/* Tablet Large (768px - 1024px) */
@media (max-width: 1024px) {
  .container, .card, .dashboard-card, .auth-card {
    max-width: 95%;
    padding-left: 30px;
    padding-right: 30px;
  }

  .logo {
    font-size: 22px;
  }

  .card-title, h1 {
    font-size: clamp(20px, 4vw, 24px);
  }

  .btn-primary, .btn-cta, button[type="submit"] {
    padding: 14px 30px;
    font-size: 16px;
  }
}

/* Tablet & Mobile Landscape (481px - 768px) */
@media (max-width: 768px) {
  /* Header & Navigation */
  .dashboard-header, header {
    padding: 0 15px;
    height: 60px;
  }

  .logo {
    font-size: 20px;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-link {
    font-size: 12px;
    padding: 6px 10px;
  }

  .logout-btn {
    padding: 8px 15px;
    font-size: 13px;
  }

  /* Main Content */
  .main-content {
    padding-top: 80px;
    padding-bottom: 30px;
  }

  .container {
    padding: 0 15px;
  }

  /* Cards */
  .dashboard-card, .card, .auth-card {
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 15px;
    margin-bottom: 20px;
  }

  .card-title, h1, h2 {
    font-size: clamp(18px, 5vw, 22px);
  }

  h3 {
    font-size: clamp(16px, 4vw, 20px);
  }

  h4 {
    font-size: clamp(14px, 3.5vw, 18px);
  }

  /* Buttons */
  .btn-primary, .btn-cta, button[type="submit"] {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
  }

  /* Forms */
  .form-group {
    margin-bottom: 18px;
  }

  input, textarea, select {
    font-size: 15px;
    padding: 12px 15px;
  }

  label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  /* Grids */
  .matches-grid, .candidates-grid, .jobs-grid, .grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  /* Application Items */
  .application-item, .job-card, .match-card {
    padding: 15px;
  }

  .app-role, .job-title {
    font-size: 18px;
  }

  .app-meta {
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
  }

  .status-badge {
    font-size: 11px;
    padding: 5px 10px;
  }

  /* Floating Shapes */
  .floating-shape {
    opacity: 0.2 !important;
  }

  /* Auth Forms */
  .auth-box, .form-container {
    padding: 30px 25px;
  }

  .toggle-text, .form-footer {
    font-size: 13px;
  }

  /* Wizard Steps */
  .wizard-steps {
    flex-direction: column;
    gap: 10px;
  }

  .step {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Info Boxes */
  .info-box {
    padding: 15px;
    margin-bottom: 20px;
  }

  .info-title {
    font-size: 14px;
  }

  .info-text {
    font-size: 12px;
  }
}

/* Mobile Portrait (320px - 480px) */
@media (max-width: 480px) {
  /* Body */
  body {
    font-size: 14px;
  }

  /* Header */
  .dashboard-header, header {
    padding: 0 10px;
    height: 55px;
  }

  .logo {
    font-size: 18px;
  }

  .nav-links {
    display: none; /* Hide nav on small mobile, use hamburger */
  }

  .logout-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Main Content */
  .main-content {
    padding-top: 70px;
    padding-bottom: 20px;
  }

  .container {
    padding: 0 10px;
  }

  /* Cards */
  .dashboard-card, .card, .auth-card, .confirmation-card {
    padding: 20px 15px;
    border-radius: 12px;
    width: 100%;
    margin: 15px 0;
  }

  .card-header {
    padding-bottom: 15px;
    margin-bottom: 15px;
  }

  .card-title, h1 {
    font-size: 20px;
    line-height: 1.3;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 16px;
  }

  h4, .section-title {
    font-size: 14px;
  }

  p, .text-body {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Buttons */
  .btn-primary, .btn-cta, button[type="submit"] {
    width: 100%;
    font-size: 14px;
    padding: 12px 20px;
  }

  .btn-secondary, .btn-outline {
    font-size: 13px;
    padding: 10px 16px;
  }

  /* Forms */
  .form-group {
    margin-bottom: 15px;
  }

  input, textarea, select {
    font-size: 16px !important; /* Prevent iOS zoom */
    padding: 12px;
  }

  label {
    font-size: 12px;
  }

  .checkbox-label, .radio-label {
    font-size: 13px;
  }

  /* Application Items */
  .application-item, .job-card, .match-card {
    padding: 12px;
  }

  .app-role, .job-title {
    font-size: 16px;
  }

  .match-icon {
    font-size: 36px;
  }

  .match-title {
    font-size: 15px;
  }

  .match-details {
    font-size: 12px;
  }

  /* Tags & Badges */
  .skill-tag, .badge, .tag {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Empty States */
  .empty-state {
    padding: 40px 15px;
  }

  .empty-icon {
    font-size: 48px;
  }

  /* Modals */
  [style*="position: fixed"] > .dashboard-card,
  .modal-content {
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  /* Floating Shapes */
  .floating-shape {
    display: none !important;
  }

  /* Chat Interface */
  #chat-messages {
    font-size: 13px;
    gap: 10px;
  }

  #chat-input {
    font-size: 16px !important; /* Prevent iOS zoom */
    padding: 10px 12px;
  }

  /* Wizard */
  .wizard-header {
    padding: 20px 15px;
  }

  .wizard-title {
    font-size: 18px;
  }

  .wizard-step {
    font-size: 11px;
    padding: 6px 10px;
  }

  .wizard-content {
    padding: 20px 15px;
  }

  /* Auth Pages */
  .auth-container {
    padding: 15px 10px;
  }

  .auth-box, .form-container {
    padding: 25px 20px;
  }

  .auth-title, .form-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .toggle-text {
    font-size: 12px;
    margin-top: 15px;
  }

  /* Tables */
  table {
    font-size: 12px;
  }

  th, td {
    padding: 8px 6px;
  }

  /* Icon Containers */
  .icon-container {
    width: 80px;
    height: 80px;
  }

  .icon {
    font-size: 40px;
  }

  /* Dividers */
  .divider {
    width: 50px;
    height: 3px;
  }

  /* Lists */
  ul, ol {
    font-size: 13px;
    padding-left: 20px;
  }

  li {
    margin-bottom: 8px;
  }

  /* Info Boxes */
  .info-box {
    padding: 12px 15px;
    border-radius: 10px;
  }

  .info-title {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .info-text, .info-list li {
    font-size: 11px;
    line-height: 1.5;
  }
}

/* Mobile Extra Small (< 360px) */
@media (max-width: 360px) {
  .logo {
    font-size: 16px;
  }

  .card-title, h1 {
    font-size: 18px;
  }

  h2 {
    font-size: 16px;
  }

  h3 {
    font-size: 15px;
  }

  p, .text-body {
    font-size: 13px;
  }

  .btn-primary, .btn-cta, button[type="submit"] {
    font-size: 13px;
    padding: 10px 16px;
  }

  .dashboard-card, .card, .auth-card {
    padding: 15px 12px;
  }

  input, textarea, select {
    font-size: 16px !important;
    padding: 10px;
  }

  .app-role, .job-title {
    font-size: 15px;
  }

  .info-text, .info-list li {
    font-size: 10px;
  }
}

/* Landscape Mode (height < 500px) */
@media (max-height: 500px) and (orientation: landscape) {
  .main-content {
    padding-top: 70px;
    padding-bottom: 20px;
  }

  .dashboard-card, .card {
    margin-bottom: 15px;
    padding: 20px;
  }

  .empty-state {
    padding: 30px 15px;
  }

  .empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
  }

  .confirmation-card, .auth-card {
    padding: 30px 25px;
  }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .dashboard-card, .card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  }

  .btn-primary, .btn-cta {
    box-shadow: 0 4px 12px rgba(0,71,171,0.2);
  }
}

/* Print Styles */
@media print {
  .dashboard-header, header,
  .logout-btn, .nav-links,
  .btn-primary, .btn-cta, button,
  .floating-shape {
    display: none !important;
  }

  .main-content {
    padding-top: 20px;
  }

  .dashboard-card, .card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  body {
    background: white;
  }
}

/* ==================== UTILITY CLASSES ==================== */

/* Hide on mobile */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Hide on desktop */
@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* Text alignment responsive */
@media (max-width: 768px) {
  .text-center-mobile {
    text-align: center !important;
  }
}

/* Full width on mobile */
@media (max-width: 768px) {
  .full-width-mobile {
    width: 100% !important;
  }
}

/* Stack vertically on mobile */
@media (max-width: 768px) {
  .stack-mobile {
    flex-direction: column !important;
  }
}
