/* ============================================================
   Mobile Responsive Styles - evento.caveduroi.com
   ============================================================ */

/* General layout adjustments */
@media (max-width: 768px) {
  body {
    margin: 10px;
    font-size: 15px;
    line-height: 1.4;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  img.logo-img {
    width: 150px;
    margin: 10px 0;
  }
  
  div#reservation_div {
    width: auto;
  }

  /* Containers */
  .content, .main, .container, .page {
    width: 100% !important;
    padding: 0 10px;
    box-sizing: border-box;
  }

  /* Layout sections */
  .left, .right, .sidebar {
    width: 100% !important;
    float: none !important;
    margin: 0 0 20px 0;
  }

  /* Dialogs */
  .ui-dialog {
    width: 90% !important;
    left: 5% !important;
    top: 5% !important;
  }

  .ui-dialog .ui-dialog-title {
    font-size: 1.1em;
  }

  #dialog-form input.text,
  #dialog-form label {
    width: 100%;
  }

  #dialog-form .label_halb {
    width: 100%;
    float: none;
  }

  .prenotazione-effettuata {
    font-size: 14px;
  }

  /* Buttons and inputs */
  button,
  input[type="submit"],
  .ui-button {
    width: 100%;
    font-size: 1rem;
    padding: 10px;
    border-radius: 8px;
  }

  /* Headings */
  h1, h2, h3, h4 {
    line-height: 1.2;
    word-break: break-word;
  }
}

/* ============================================================
   Responsive stacked table style
   ============================================================ */
@media (max-width: 768px) {
  table {
    border: 0;
    width: 100%;
  }

  table thead {
    display: none;
  }

  table,
  table tbody,
  table tr,
  table td {
    display: block;
    width: 100%;
  }

  table tr {
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.5rem;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  table td {
    text-align: right;
    padding: 8px;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
  }

  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    top: 10px;
    font-weight: bold;
    text-align: left;
    color: #333;
  }

  table td:last-child {
    border-bottom: none;
  }
  
  table#reservation_table td:before {
    left: 12px;
    top: 7px;
  }
  
  table#reservation_table th, table#reservation_table td {
    padding: 8px;
  }
  
  table#reservation_table td {
	text-align: right;
  }
  
  div.reservation_time_div {
    display: block;
    width: auto;
    border: 1px solid #005596;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
  
  div.reservation_time_cell_box {
    display: block;
    width: auto;
    height: auto;
	text-align: right;
	padding: 5px;
  }
}

/* ============================================================
   Smaller screens (phones)
   ============================================================ */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  img.logo-img {
    width: 120px;
  }

  .ui-dialog {
    font-size: 13px;
  }

  h1, h2, h3 {
    font-size: 1.1em;
  }

  button,
  input[type="submit"],
  .ui-button {
    font-size: 0.95rem;
    padding: 8px;
  }
}
