:root {
  --main-bg-color: #ffffff;
  --second-bg-color: #f6f7f8;
  --primary-color: #006723;
  --primary-color-hover: #014016;
  --header-border-color: #dee1e6;
  --border-color: #e5e7eb;
  --z-index-sidenav: 500;
  --z-index-header: 1000;
  --z-index-footer: 1000;
}

* {
  border: 0;
  margin: 0;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  margin: 0;
}
body {
  font-family: "Lexend", sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
header {
  height: 4rem;
  position: sticky;
  display: flex;
  background-color: var(--main-bg-color);
  top: 0;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid black;
  padding-right: 1rem;
  flex-shrink: 0;
  overflow: visible;
  z-index: var(--z-index-header);
}

main {
  flex: 1;
  box-sizing: border-box;
  padding: 1em 1em 6em 1em;
  background-color: var(--second-bg-color);
}
footer {
  padding: 1rem;
  text-align: center;
  background-color: var(--main-bg-color);
  border-top: 1.5px solid black;
  z-index: var(--z-index-footer);
  width: 100%;
  margin-top: auto;
}
footer p {
  width: 80%;
  margin: 0 auto;
}
section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 2.5em;
}

button {
  border-radius: 0.5rem;
  width: 6.5rem;
  font-size: 0.9rem;
  height: 2.5rem;
  margin-top: 1rem;
  transition:
    background-color 0.2s,
    color 0.5s,
    border 0.2s;
  cursor: pointer;
  font-family: inherit;
}
::placeholder {
  color: #5e5e5e;
  opacity: 1;
}
a:link {
  color: var(--primary-color);
}
a:visited {
  color: #870058;
}
a.outlined,
button.outlined-btn {
  transition: all 0.3s;
  background-color: var(--second-bg-color);
  border: 1px solid black;
  color: black;
}
a.outlined:hover,
button.outlined-btn:hover {
  background-color: black;
  border: 1px solid black;
  color: white;
}
a.primary,
button.btn-primary {
  background-color: var(--primary-color);
  color: white;
  font-family: inherit;
}
a.primary:hover,
button.btn-primary:hover {
  background-color: var(--primary-color-hover);
  color: white;
}
a.btn-like {
  border-radius: 0.5rem;
  height: 2.5rem;
  text-decoration: none;
  width: 6.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.9rem;
}
.material-symbols-outlined {
  font-size: 27px;
  color: var(--primary-color);
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}
.icon-fill {
  font-variation-settings: "FILL" 1;
}
.icon-white {
  color: white;
}

.grid {
  gap: 1em;
  display: grid;
  padding-top: 1rem;
  justify-content: center;
  justify-items: center;
  width: 100%;
}
.three-columns {
  grid-template-columns: repeat(auto-fit, 21.165rem);
}
.four-columns {
  grid-template-columns: repeat(auto-fit, 18rem);
}

.sr-only {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.help-nav {
  position: absolute;
  text-indent: -999em;
}
.row-btn {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}

h1 {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 0.5em;
  color: black;
}
h2 {
  font-size: 2em;
  margin-top: 0;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-align: center;
}
h3 {
  font-family: inherit;
  margin: 0.1em 0 0.2em 0;
  line-height: 1.2;
}
p {
  font-family: inherit;
  line-height: 1.5;
  margin-bottom: 0.5em;
}

/*
h1 + p {
  text-align: center;
  max-width: 800px;       
  margin: 0 auto 1em auto;
  font-size: 1.2em;
  padding: 0 1em;        
} Da modificare l'about le search page e book app*/
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75em;
  border: 1px solid black;
  border-radius: 1em;
  box-sizing: border-box;
  margin-top: 0.4em;
  margin-bottom: 1em;
  resize: vertical;
  font-family: inherit;
}
input[type="submit"] {
  cursor: pointer;
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  border-radius: 1rem;
  font-weight: 600;
  transition: background-color 0.2s;
  font-family: inherit;
}
input[type="submit"]:hover {
  background-color: var(--primary-color-hover);
}
.hide {
  display: block;
  background-image: url("../logo_h1.png");
  margin-left: 1rem;
  margin-top: 2rem;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: contain;
}
.title-main {
  font-size: 1em;
  text-align: center;
  width: 100%;
  display: block;
}
.small {
  font-size: 1.1rem;
}
.medium {
  font-size: 1.5rem;
}
.title-card {
  font-size: 1.5em;
  text-align: left;
}
.form-search-container {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
  align-items: center;
}
.form-search-container input[type="search"] {
  flex-grow: 1;
  height: 3rem;
  font-size: 1rem;
  border-radius: 1rem;
  border: 1px solid black;
  padding-left: 1rem;
  box-sizing: border-box;
}

.form-search-container button {
  width: 10rem;
  height: 3rem;
  background-color: var(--primary-color);
  color: var(--main-bg-color);
  font-weight: bold;
  font-size: 1rem;
  border-radius: 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 0;
}
.form-search-container button:hover {
  background-color: var(--primary-color-hover);
}

.col-img {
  width: 30%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  display: block;
  border-radius: 8px;
  background-repeat: no-repeat;
}

/**********************/
/*       NAVBAR       */
/**********************/
.top-navbar a {
  height: 2rem;
  text-decoration: none;
  padding: 0.5rem;
  color: black;
  border-radius: 1rem;
  border: 2px solid transparent;
  transition: all 0.3s;
}
.top-navbar a:hover {
  border: var(--primary-color) solid 2px;
  background-color: var(--primary-color);
  border-radius: 1rem;
  color: var(--main-bg-color);
}
.top-navbar a:hover a:visited {
  color: inherit;
}

.top-navbar ul {
  list-style: none;
  flex-direction: row;
  display: flex;
  gap: 2rem;
}

.top-navbar .current-page {
  pointer-events: none;
  padding: 0.5rem;
  border: var(--primary-color) solid 2px;
  background-color: var(--primary-color);
  border-radius: 1rem;
  color: var(--main-bg-color);
}

/* BREADCRUMB */
#breadcrumb {
  display: block;
  padding: 0.8em 1em 0.1em;
  font-size: 1em;
  text-align: left;
  background-color: var(--second-bg-color);
}
#breadcrumb a {
  color: var(--primary-color);
  text-decoration: underline;
}

nav.breadcrumb-area-personale {
  display: block;
  font-size: 1em;
  padding-top: 1rem;
  text-align: left;
  background-color: var(--second-bg-color);
}

.home-hero-section {
  padding-top: 0.2rem;
}

/*Per Hamburger*/
.menu-toggle-text,
.menu-toggle {
  display: none;
}
/**********************/
/*        HOME        */
/**********************/

.home-hero-content {
  background-color: var(--primary-color);
  border-radius: 1.5rem;
  padding: 0.2rem 3rem 1rem;
  max-width: 1260px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
}
.home-hero-content > h1 {
  color: white;
}
.home-hero-content > p {
  color: white;
}
.home-hero-form-container {
  width: 100%;
  border-radius: 1.5rem;
  max-width: 700px;
  margin-top: 1.5rem;
  background-color: var(--main-bg-color);
  padding: 1.5rem 1.5rem;
}

.home-hero-form-container fieldset {
  display: flex;
  align-items: center;
  padding: 0;
  margin-bottom: 1.5rem;
  border: none;
}
.home-hero-form-container legend {
  margin-right: 1rem;
  float: left;
}
.filter-container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}
.home-hero-form-container .radio-item {
  display: flex;
  gap: 0.5rem;
}
.sponsor-section-content,
.team-section-content,
.service-section-content,
.farm-content {
  max-width: 80em;
  width: 100%;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.service-section-content h2,
.farm-content h2 {
  text-align: left;
}
.farm-content > p,
.service-section-content > p {
  margin-top: 1rem;
}

.dintorni-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.dintorni-form label {
  font-size: 1.1em;
}

.dintorni-form-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dintorni-form-controls > select {
  width: auto;
  min-width: 250px;
  margin: 0;
}

.dintorni-form-controls > button {
  margin-top: 0;
}

.service-card {
  display: flex;
  height: 14em;
  flex-direction: column;
  padding: 1em;
  border-radius: 1em;
  width: 21em;
  background-color: var(--main-bg-color);
  border: 2px solid var(--primary-color);
  align-items: center;
  text-align: center;
}

.service-card ul {
  text-align: left;
}

.icon-container {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(0, 103, 35, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.med-card {
  max-width: 17.75rem;
  width: 100%;
  height: 100%;
  background-color: var(--main-bg-color);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 2px solid var(--border-color);
}
.farm-img-container {
  position: relative;
}
.farm-img-container img {
  display: block;
  object-fit: cover;
  object-position: top;
  width: 100%;
  height: 130px;
  border-radius: 1rem 1rem 0 0;
}
.farm-card .farm-stato-closed,
.farm-card .farm-stato-open {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 1rem 1rem;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.85rem;
}
.farm-card .farm-stato-open {
  background-color: #e6f7ed;
  color: var(--primary-color);
}
.farm-card .farm-stato-closed {
  background-color: #fef1f1;
  color: #d32f2f;
}
/*.farm-card a {
  text-decoration: none;
  width: 7rem;
  height: 2.5rem;
}*/

#scroll-btn {
  display: none;
  position: fixed;
  bottom: 2em;
  right: 3em;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  border-radius: 0.5em;
  min-width: auto;
  z-index: 1001;
}

#scroll-btn:hover {
  background-color: var(--primary-color-hover);
}
/* --- CARD FARMACIA --- */
.farm-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--main-bg-color);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  overflow: hidden;
  transition:
    transform 0.2s ease-out,
    box-shadow 0.2s ease-out,
    border-color 0.2s ease;
  width: 100%;
}
.farm-card:hover {
  transform: translateY(-0.35em);
  box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.3);
  box-shadow:
    0 0.5em 1em rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px var(--primary-color);
}
.card-image-header {
  width: 100%;
  height: 10em;
  overflow: hidden;
}
.card-image-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.farm-card-content {
  padding: 1.2em;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.8em;
}
.farm-card-content .available {
  color: var(--primary-color);
}
.farm-card-content .low-storage {
  color: #8a0000;
}
.card-header .title-card {
  margin: 0 0 0.3em 0;
  font-size: 1.3rem;
  color: var(--primary-color);
  line-height: 1.5;
}
.card-header .address {
  margin: 0;
  color: #666;
}
.card-meta .phone-link {
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
}
.phone-number-text {
  text-decoration: underline;
}
.services-preview {
  margin-top: 0.5rem;
}
.service-label {
  display: block;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 0.4em;
}
.service-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.service-tags li {
  font-size: 0.8rem;
  background-color: #e8f5e9;
  color: var(--primary-color);
  padding: 0.25em 0.7em;
  border-radius: 50px;
  font-weight: 600;
  border: 1px solid var(--primary-color);
}
.service-tags li.more-badge {
  background-color: #f3f4f6;
  color: #666;
  border-color: #e5e7eb;
  font-weight: 700;
}
.farm-orario {
  text-align: right;
}

.container-zig-zag {
  padding: 0em 1em;
  width: 80%;
  margin: 0 auto;
}
.row {
  margin-top: 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2em;
}
.row.inverti-ordine {
  margin-top: 1rem;
  flex-direction: row-reverse;
}
.col-testo {
  flex: 1;
  width: 60%;
}

.col-testo h2 {
  color: var(--primary-color);
}
.col-testo p {
  margin: 1.5em 0em;
}
.intro-community p {
  max-width: 70em;
  line-height: 1.8;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.intro-community h2 {
  margin-top: 1rem;
  color: var(--primary-color);
}
.col-testo ul {
  padding-left: 1.5em;
  margin-top: 0;
}
.col-testo li {
  line-height: 1.8;
  margin-bottom: 1em;
}
.col-testo li::marker {
  color: var(--primary-color);
}
.avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
  border-radius: 8px;
  width: 12.5em;
  height: 16em;
  padding: 1.5rem;
  text-align: center;
  border: var(--primary-color) solid 1px;
  background-color: color-mix(in srgb, var(--primary-color), transparent 95%);
  position: relative;
  transition:
    transform 0.2s ease-out,
    box-shadow 0.2s ease-out,
    border-color 0.2s ease;
}
.avatar-container:hover,
.avatar-container:focus-visible {
  transform: translateY(-0.35em);
  box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.3);
  box-shadow:
    0 0.5em 1em rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px var(--primary-color);
}
.avatar-img {
  width: 6.25em;
  height: 6.25em;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  border: 0.15em solid white;
  transition: transform 0.2s ease;
}
.ghp_1 {
  background-image: url("https://github.com/Scafu.png");
}
.ghp_2 {
  background-image: url("https://github.com/matteorocco27.png");
}
.ghp_3 {
  background-image: url("https://github.com/Albero04.png");
}
.ghp_4 {
  background-image: url("https://github.com/saragifi.png");
}
.avatar-container span {
  font-size: 1.3rem;
  transition: color 0.2s;
}
.contact-info {
  box-sizing: border-box;
  width: 40%;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  padding: 2em;
  margin: 1em auto;
}

address {
  font-style: normal;
}
.contact-item {
  margin-bottom: 1em;
}
.contact-item dt {
  font-weight: 700;
  margin-bottom: 0.3em;
  line-height: 1.2;
}
.contact-item dd {
  margin-left: 1.5em;
  margin-bottom: 0;
}
.sponsor-card {
  border: 1px solid var(--primary-color);
  width: 12.5em;
  height: 9.5em;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  display: flex;
  background-color: color-mix(in srgb, var(--primary-color), transparent 95%);
}

.sponsor-card img {
  height: 50%;
  width: 100%;
  object-fit: contain;
}
.sponsor-card .uni-logo {
  height: 70%;
}

/**********************/
/*     LOGIN-PAGE     */
/**********************/
.login-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.login-container
  p:not(.error-message):not(.general-error):not(.success-message) {
  color: #5e5e5e;
  font-size: 1em;
}
.user-login {
  background-color: var(--main-bg-color);
  width: 35rem;
  border: 2px solid var(--primary-color);
  border-radius: 20px;
  box-sizing: border-box;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.user-login form {
  gap: 1rem;
  display: flex;
  flex-direction: column;
}
.user-login input[type="password"] {
  width: 100%;
  padding: 0.75em;
  border: 1px solid black;
  border-radius: 1em;
  box-sizing: border-box;
  margin-top: 0.4em;
  margin-bottom: 1em;
  resize: vertical;
  font-family: inherit;
}

.user-login button {
  color: white;
  display: flex;
  flex-direction: row;
  gap: 0.5em;
  font-size: 1rem;
  align-items: center;
  justify-content: center;
  height: 3rem;
  width: 100%;
  background-color: var(--primary-color);
}
.user-login button:hover {
  background-color: var(--primary-color-hover);
}
.user-login > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.user-login a:visited {
  color: inherit;
}
.login-form-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/**********************/
/*   AREA-PERSONALE   */
/**********************/

.page-wrapper {
  display: flex;
  overflow: hidden;
}

.main-area-personale {
  display: flex;
  margin-left: 15rem;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 2rem 1rem;
  overflow-y: auto;
}

.sidenav {
  height: 100%;
  width: 15rem;
  position: fixed;
  top: 4rem;
  background-color: var(--main-bg-color);
  z-index: var(--z-index-sidenav);
  overflow-x: hidden;
  padding: 0.5rem;
  border-right: 1px solid black;
}
.sidenav a {
  padding: 0.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  width: 100%;
  border-radius: 0px 12px;
  transition: all 0.35s;
  border: 2px solid transparent;
}
.sidenav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}
.sidenav a:hover {
  border: var(--primary-color) solid 2px;
  background-color: var(--primary-color);
  border-radius: 0px 12px;
  color: white;
}
.sidenav .current {
  background-color: var(--primary-color);
  color: white;
  cursor: default;
}
.current .material-symbols-outlined,
.sidenav a:hover .material-symbols-outlined {
  color: white;
}

.current-row {
  background-color: var(--primary-color);
  border-radius: 12px;
}
.current-row a {
  color: white;
  cursor: default;
}

.activity-row {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}
.activity-card {
  display: flex;
  flex-direction: column;
  width: 20rem;
  height: 10rem;
  background-color: white;
  border-radius: 12px;
  padding: 1rem;

  border: 1px solid var(--primary-color);
}
.activity-title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  color: var(--primary-color);
}
.activity-date {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
  font-size: 2rem;
  gap: 0.5rem;
}
.activity-date p {
  font-size: 1rem;
}
.appuntamenti-section {
  box-sizing: border-box;
  margin-top: 1rem;
  width: 100%;
}
.appuntamenti-section h2 {
  font-size: 1.5rem;
  text-align: start;
}
.appuntamenti-column {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
}
.appuntamento-card {
  display: flex;
  flex-direction: row;
  padding: 1rem;
  height: 5rem;
  background-color: white;
  padding: 1rem;
  align-items: center;
  gap: 1rem;
}

.appuntamento-card:not(:last-child) {
  border-bottom: 1px solid var(--primary-color);
}
.appuntamento-card-date {
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  padding: 0.5em 0.8em;
  background-color: var(--second-bg-color);
  text-align: center;
  width: 4em;
}
.appuntamento-card-details {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.appuntamento-card-details div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.row-details {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.title-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.main-area-personale-title-row {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.main-area-personale-title-row h1 {
  text-align: start;
  margin: 0;
}
.main-area-personale-title-row > div {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.title-row h2 {
  margin: 0;
}
.content-section {
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 1rem;
  align-items: start;
}
#profilo.content-section {
  gap: 1.5rem;
}
#profile-heading {
  font-size: 2em;
  text-align: start;
}

.content-hidden {
  display: none;
}

.profile-summary {
  width: 100%;
  height: auto;
  border: 1px solid var(--primary-color);
  background-color: white;
  border-radius: 12px;
  padding: 2rem;
}
.profile-summary h3 {
  font-size: 1.8rem;
}
.profile-summary > div {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}
.profile-summary > div > .username {
  color: var(--primary-color);
}
.dettagli-personali {
  align-items: stretch;
  padding: 1rem;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 12px;
  background-color: white;
  border: 1px solid var(--primary-color);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.details-grid > div {
  display: flex;
  flex-direction: column;
}
.details-grid input {
  height: 3rem;
  font-size: 1rem;
}
.dettagli-personali .row-btn {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: start;
}
.delete-account {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  text-decoration: none;
}
a.delete-account span,
a.delete-account {
  color: rgb(153, 5, 5);
}
#delete-confirm {
  margin: auto;
  align-items: center;
}
#delete-confirm > div {
  background-color: white;
  width: 35rem;
  height: auto;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 12px;
  box-shadow: 0rem 0rem 6rem -3rem var(--primary-color);
}
#delete-confirm > div > h2 {
  font-weight: 500;
}
.icon-warning {
  color: red;
  font-size: 2rem;
}
.icon-container-warning {
  background-color: rgba(255, 0, 0, 0.1);
  width: 3.5rem;
  height: 3.5em;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 100%;
}
.btn-primary.no-margin {
  margin: 0;
}

#delete-confirm .row-btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

/**********************/
/*     INFO-FARM      */
/**********************/

#TopContainerInfoFarm {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

#TopContainerInfoFarm h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  text-align: left;
}

#InfoFarmStatus .aperto {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background-color: #fef1f1;
  color: #155724;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
#InfoFarmStatus .chiuso {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background-color: #fef1f1;
  color: #d32f2f;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.FarmImageWrapper {
  margin: 0 auto 2.5rem;
  max-width: 1200px;
  border-radius: 12px;
  overflow: hidden;
}

.FarmImageWrapper img {
  width: 100%;
  height: auto;
  max-width: 1200px;
  max-height: 400px;
  object-fit: cover;
  aspect-ratio: 2 / 1;
  object-position: center;
  display: block;
}

/* Sezioni comuni (Info, Orari, Servizi) */
.info-generali-elemento {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin: 0 auto 2rem;
  width: 100%;
}

.info-generali-elemento h2 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--second-bg-color);
  text-align: left;
}

/* Info Generali */
.info-generali-elemento p {
  padding: 0.75rem;
  margin: 0 0 0.5rem 0;
  border-left: 3px solid var(--primary-color);
  background-color: var(--second-bg-color);
  border-radius: 6px;
  line-height: 1.5;
}

/* Orari di Apertura */
.OrarioGiorno {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background-color: var(--second-bg-color);
  border-radius: 6px;
}

.OrarioGiorno.chiuso {
  opacity: 0.6;
}

.OrarioGiorno > p {
  margin: 0;
}

/* Servizi Offerti */
.lista-servizi {
  list-style-type: none;
  padding-left: 0;
}

.servizio-offerto {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--primary-color);
  background-color: var(--second-bg-color);
  border-radius: 6px;
}
.SerivzioOfferto {
  font-weight: bold;
}
.descrizione-servizio {
  font-weight: normal;
}

/******* INFO MED *******/

#TopContainerInfoMed {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

#TopContainerInfoMed h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  text-align: left;
}

.MedImageWrapper {
  margin: 0 auto 2.5rem;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  background-color: var(--primary-color);
  padding: 0.5em;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-sizing: border-box;
}

.MedImageWrapper img {
  width: 100%;
  height: auto;
  max-width: 400px;
  max-height: 200px;
  object-fit: contain;
  object-position: center;
  aspect-ratio: 2 / 1;
  object-position: center;
  background-color: var(--primary-color);
  padding: 0rem 0.5em 0rem 0.5em;
  padding: 0;
  border-radius: 8px;
}

/* Sezioni Info Medicinale */

/* Lista dettagli medicinale */
.lista-dettagli-med {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lista-dettagli-med li {
  line-height: 1.6;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--primary-color);
  background-color: var(--second-bg-color);
  border-radius: 6px;
}

/* Sezione Farmacie Disponibili */
#FarmacieDisponibili {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

#FarmacieDisponibili h2 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  text-align: left;
}

.grid-med-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/******* PAGINA PRENOTAZIONE VISITA *******/

/* Nascondere pallino di default */
.service-box input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.service-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  padding: 0;
  border: 0.125em solid var(--header-border-color);
  border-radius: 0.8em;
  background-color: var(--main-bg-color);

  overflow: hidden;

  cursor: pointer;
  position: relative;
}

.service-box:hover {
  border-color: var(--primary-color);
  background-color: #f0f0f0;
}

.service-box:has(input:checked) {
  border-color: var(--primary-color);
  border-width: 0.188em;
  background-color: #eafaea;
  box-shadow: 0 0.3em 0.6em rgba(0, 0, 0, 0.05);
}

.service-box:has(input:checked) strong {
  color: var(--primary-color);
}
.service-box:has(input:focus-visible) {
  outline: 0.2em solid var(--primary-color);
  outline-offset: 0.2em;
}

.service-box label {
  cursor: pointer;
  display: block;
  width: 100%;
  padding: 1.5em;
}

.service-box strong {
  display: block;
  font-size: 1.1em;
  margin-bottom: 0.3em;
}

/*
.service-box span {
    display: block;
    font-size: 0.9em;
    color: #666;
    line-height: 1.2;
}*/

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18em, 1fr));
  gap: 1em;
  width: 100%;
}

.farm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

.card-clickable-label {
  cursor: pointer;
}

.farm-name {
  font-weight: 700;
}

.farm-address {
  font-weight: 400;
  color: #666;
}

.date-picker-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2em;
  width: 100%;
}

.label-title {
  display: block;
  font-weight: 700;
  margin-bottom: 0.8em;
  text-align: center;
}

#date-pick {
  width: 100%;
  max-width: 12em;
  padding: 0.8em 1.2em;
  font-size: 1.1em;
  font-family: inherit;
  /*border: 0.125em solid var(--header-border-color); 
    border-radius: 0.5em;
    background-color: #f8f9fa;*/
  cursor: pointer;
  text-align: center;
  color: #666;
  box-sizing: border-box;
}

#date-pick:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #fff;
}

/* griglia Orari*/
.time-picker-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7em, 1fr));
  gap: 0.8em;
  margin-top: 1em;
}
.time-slot label {
  display: block;
  padding: 0.8em 0.5em;
  background-color: var(--main-bg-color);
  border: 0.063em solid #ddd;
  border-radius: 0.4em;
  text-align: center;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s;
}
.time-slot input[type="radio"]:checked + label {
  background-color: var(--primary-color);
  color: white;
}

.time-slot input[type="radio"]:focus + label {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  border-color: var(--primary-color);
}

.time-slot label:hover {
  border-color: var(--primary-color);
  background-color: #f0f0f0;
}
.time-slot input[disabled] + label {
  background-color: #f0f0f0;
  color: #a0a0a0;
  border-color: #e0e0e0;
  cursor: not-allowed;
  text-decoration: line-through;
}
.step-actions {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-start;
  gap: 2em;

  align-items: center;
  margin-top: 0.3em;
  padding: 1.5em;
}

#regForm {
  width: 95%;
  max-width: 60em;
  margin: 2em auto;
  padding: 2.5em;
  border: 3px solid var(--primary-color);
  border-radius: 0.8em;
  background-color: var(--main-bg-color);

  box-sizing: border-box;

  min-height: 40em;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Nascondi completamente il form quando ha la classe content-hidden */
#regForm.content-hidden {
  display: none !important;
}

/* nascondere passaggi del form non attivi (prova anche disabilitando js) */
/*.tab {
  display: none;
}*/

/*senza js*/
.tab {
  display: block;
}
.step-indicator-container {
  display: none;
}
#nextBtn,
#prevBtn {
  display: none;
}
#submitBtnNoJs {
  display: inline-block;
  width: 100%;
  margin-top: 1em;
}

/* Pulsante per la ricerca manuale (visibile di default) */
#findPharmaciesBtn {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 1.5rem auto;
}

/* con js attivo*/
.js-active .tab {
  display: none;
}
.js-active .step-indicator-container {
  display: flex; /* O block, come avevi prima */
}
.js-active .tab.show {
  display: block;
}
.js-active #submitBtnNoJs {
  display: none;
}
.js-active #submitBtnNoJs {
  display: none;
}
.js-active #submitBtnNoJs {
  display: none;
}
/* Nascondi il pulsante di ricerca manuale se JS è attivo */
.js-active #findPharmaciesBtn {
  display: none;
}
.js-active #findDintorniBtn {
  display: none;
}

.js-active #nextBtn,
.js-active #prevBtn {
  display: inline-block;
}

/* Se JS è attivo, aggiungiamo una classe al body o usiamo JS per nascondere questo bottone */
.js-active #check-time-btn {
  display: none;
}

.step {
  height: 1em;
  width: 1em;
  margin: 0 5px;
  background-color: #4caf50;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.5;
}

.step-indicator-container {
  text-align: center;
  margin-bottom: 2em;
  justify-content: center;
  gap: 10px;
  text-align: center;
  margin-bottom: 1em;
  justify-content: center;
  gap: 10px;
}

.step.active {
  opacity: 1;
  background-color: #4caf50;
}

.step.finish {
  background-color: #4caf50;
}

.instruction {
  color: #f70000;
  font-style: italic;
  text-align: center;
  margin-bottom: 1em;
}

/* --- SCHERMATA DI SUCCESSO --- */
#success-step {
  display: none;
}

.success-container {
  text-align: center;
  padding: 4em 2em;
}

.success-container h2 {
  color: var(--primary-color);
  font-size: 2em;
  margin-bottom: 1em;
}

.success-container p {
  color: #5e5e5e;
  margin-bottom: 2em;
}
/*VALIDAZIONE INPUT FORM*/
/* Campo con errore */
input.invalid,
select.invalid,
textarea.invalid {
  border: 2px solid #c62828;
  background-color: #ff7474;
  outline-color: #c62828;
}

input.invalid:focus,
select.invalid:focus,
textarea.invalid:focus {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}

/* Messaggio errore sotto il campo */
.error-message {
  display: none;
  color: #b71c1c;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: #ffebee;
  border-left: 4px solid #c62828;
  border-radius: 4px;
}

.error-message:not(:empty) {
  display: block;
}

/* Errore generale in cima al form */
.general-error {
  display: none;
  color: #b71c1c;
  background-color: #ffebee;
  border: 2px solid #c62828;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.general-error:not(:empty) {
  display: block;
}

/* Messaggio successo */
.success-message {
  display: none;
  color: #1b5e20;
  background-color: #e8f5e9;
  border: 2px solid #4caf50;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.success-message:not(:empty) {
  display: block;
}

/* Vecchio stile per compatibilità */
#general-error-msg {
  display: none;
  color: #d93025;
  text-align: right;
}

#regForm h3 {
  background-color: #e9faea;
  color: var(--primary-color);
  font-weight: 600;
  padding: 12px 15px;
  margin-bottom: 0;
  margin-top: 1.5rem;
  border-bottom: 3px solid var(--primary-color);
  border-radius: 8px 8px 0 0;
}

.info-app {
  border-radius: 0 0 8px 8px;
  background-color: #fff;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.data-row {
  display: flex;
  align-items: stretch;
  padding: 0;
  border-bottom: 1px solid #eee;
}

.data-row:last-child {
  border-bottom: none;
}

.data-row dt {
  flex-basis: 30%;
  flex-shrink: 0;
  font-weight: 600;
  background-color: #f6f7f9;
  padding: 1em;
}

.data-row dt::after {
  content: ":";
}

.data-row dd {
  flex-basis: 70%;
  margin: 0;
  color: #000;
  line-height: 1.5;
  padding: 1em;
}

/* Sezione per dividere Farmacia e Utente */
.split-section {
  display: flex;
  flex-wrap: wrap;
}

.split-col {
  flex: 1;
  min-width: 300px;
  border-right: 1px solid var(--border-color);
}
.split-col:last-child {
  border-right: none;
}

.section-title {
  background-color: #eafaea; /* Colore tenue basato sul primary */
  color: var(--primary-color);
  padding: 0.8em 1em;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer della ricevuta */
.booking-footer {
  padding: 1.5em;
  background-color: var(--second-bg-color);
  text-align: center;
  font-size: 0.9em;
  color: #666;
}

/* Azioni (bottoni) fuori dal foglio stampabile */
.booking-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}
.back-home-anchor,
.booking-actions button {
  width: 10rem;
  height: 3rem;
  font-size: 1rem;
  border-radius: 1rem;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-decoration: none;
}
.booking-actions button {
  background-color: var(--primary-color);
  color: white;
}
.back-home-anchor {
  transition: all 0.3s;
  background-color: var(--second-bg-color);
  border: 1px solid black;
  color: black;
}
.back-home-anchor:visited {
  color: inherit;
}
.back-home-anchor:hover {
  background-color: black;
  border: 1px solid black;
  color: white;
}

.booking-actions button:hover {
  border: 2px solid var(--primary-color);
  background-color: var(--primary-color-hover);
}
.booking-actions button span {
  color: white;
}
.booking-actions button:hover span {
  color: white;
}

/******* PAGINE ERRORI *******/

.center-error {
  display: flex;
  flex-direction: column;
  align-items: center; /* centra orizzontalmente */
  justify-content: center; /* centra verticalmente */
  text-align: center;
  min-height: 60vh; /* mantiene il contenuto centrato nella pagina */
}

/* --- PAGINA CONSIGLI --- */
.banner-tips {
  margin-top: 1.5em;
  background-color: #ecf5a5;
  border-radius: 8px;
  max-width: 60em;
  margin-left: auto;
  margin-right: auto;
  padding: 1em 2em;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2em;
}
.banner-btn {
  margin-left: 1em;
  align-self: center;
  padding: 0.5em;
}
.banner-text h2 {
  font-size: 1em;
  margin-bottom: 0.5em;
}
.banner-text p {
  margin: 0;
  line-height: 1.5;
}
.faq-container {
  display: block;
  max-width: 50em;
  margin: 0 auto;
  padding: 0.5em 1.5em;
}

.faq-container h2 {
  margin-top: 1em;
  margin-bottom: 1em;
  color: var(--primary-color);
}

.faq-item {
  display: block;
  width: 100%;
  border: 3px solid var(--primary-color);
  border-radius: 8px;
  margin-bottom: 1.5em;
  overflow: hidden;
}
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2em 1.5em;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  background-color: var(--main-bg-color);
  border-radius: 8px;
  transition: background-color 0.2s;
}

summary:hover {
  background-color: #eee;
}

summary::after {
  content: "+";
  color: var(--primary-color);
}

details[open] summary::after {
  content: "-";
}

.faq-content {
  padding: 1.5rem;
  line-height: 1.6;
  background-color: var(--main-bg-color);
}

/**********************/
/* NOTIFICATION SYSTEM */
/**********************/
.notification {
  position: fixed;
  top: 5rem;
  right: 2rem;
  min-width: 300px;
  max-width: 500px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  animation: slideInRight 0.3s ease-out;
  transition: opacity 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-success {
  background-color: #d4edda;
  border-left: 4px solid #28a745;
  color: #155724;
}

.notification-error {
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
  color: #721c24;
}

.notification .material-symbols-outlined {
  font-size: 28px;
  flex-shrink: 0;
}

.notification-success .material-symbols-outlined {
  color: #28a745;
}

.notification-error .material-symbols-outlined {
  color: #dc3545;
}

.notification span:not(.material-symbols-outlined) {
  flex: 1;
  font-weight: 500;
}

.notification-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  padding: 0;
  width: auto;
  height: auto;
  margin: 0;
  line-height: 1;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

/* Authentication required message */
.auth-required-message {
  margin: 4em auto;
  max-width: 700px;
  text-align: center;
  padding: 3em 2em;
  background-color: var(--main-bg-color);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-required-message h2 {
  color: var(--primary-color);
  font-size: 2em;
  margin-bottom: 0.5em;
}

.auth-required-message p {
  font-size: 1.1em;
  line-height: 1.6;
  color: #333;
  margin-bottom: 1.5em;
}

.auth-required-message p:last-of-type {
  font-size: 1em;
  margin-top: 2em;
  margin-bottom: 0;
}

.auth-required-message a:not(.btn-primary) {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--primary-color);
  transition: border-color 0.2s;
}

.auth-required-message a:not(.btn-primary):hover {
  border-color: var(--primary-color-hover);
}

.auth-required-message .btn-primary {
  text-decoration: none;
  display: inline-block;
  padding: 0.8em 2em;
  font-size: 1.1em;
  margin: 0.5em 0;
}

/* Utility classes for visibility */
.content-hidden {
  display: none !important;
}

/* Error message styling for booking page */
.booking-error-message {
  margin: 1em 0;
}

/**********************/
/*     MED-SEARCH     */
/**********************/

.drug-list-container {
  max-width: 1000px;
  margin: 0 auto;
  font-family: inherit;
  display: flex;
  flex-direction: column;
}

.drug-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 16px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.drug-row:hover {
  box-shadow: 0 0 0 3px var(--primary-color);
}

.drug-image img {
  width: 200px;
  height: 100px;
  object-fit: fill;
  border-radius: 6px;
  margin-right: 20px;
  background: var(--primary-color);
  padding: 2px;
}

dl.drug-row dt {
  display: none;
}

#nohide {
  display: inline;
}

.drug-info {
  flex-grow: 1;
  padding-right: 20px;
}

.drug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.drug-header h2 {
  margin: 0;
  font-size: 1.2em;
}

.active-ingredient {
  color: #0056b3;
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  display: flex;
  flex-direction: row;
  gap: 6px;
}

.drug-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #555;
}

.drug-meta dd {
  background: #f4f6f8;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
  margin-bottom: 4px;
}

.drug-desc-short {
  margin-top: 2px;
  color: #666;
  font-size: 0.9rem;
  overflow: hidden;
  max-width: 400px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  margin: 8px 0;
}

.badge-ricetta {
  background: #fff3cd;
  color: #856404;
} /* Ricetta */

.badge-banco {
  background: #d4edda;
  color: #155724;
} /* Banco */

.drug-action {
  min-width: 140px;
  text-align: right;
  border-left: 1px solid #eee;
  padding-left: 15px;
  border-left: 1px solid #eee;
  padding-left: 15px;
}

.btn-details {
  text-decoration: none;
  color: #007bff;
  font-weight: 600;
  font-size: 0.9rem;
}
.btn-details:hover {
  text-decoration: underline;
}

/**********************/
/* GESTIONE FARMACIE (ADMIN) */
/**********************/

/* Messaggi di feedback */
.message {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
  font-weight: 500;
}

.message.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.message.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Contenitore bottoni */
.button-container {
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
}

.button-container .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tabella farmacie */
.farmacie-table-container {
  margin: 2rem 0;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table thead {
  background-color: var(--primary-color);
  color: #fff;
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Form inline per pulsante elimina */
.inline-form {
  display: inline;
  margin: 0;
}

.btn-delete {
  background-color: #dc3545;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: background-color 0.2s;
}

.btn-delete:hover {
  background-color: #c82333;
}

.btn-delete:focus {
  outline: 2px solid #721c24;
  outline-offset: 2px;
}

/* Contenitore form */
.form-container {
  margin: 2rem 0;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Nasconde il form solo se JavaScript aggiunge questa classe */
.form-container.js-hidden {
  display: none;
}

.form-container h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

/* Fieldset e legend */
.form-container fieldset {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-container legend {
  font-weight: 600;
  color: var(--primary-color);
  padding: 0 0.5rem;
}

/* Form groups */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-color: var(--primary-color);
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #666;
}

/* Radio groups */
.radio-group {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.radio-group input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.radio-group label {
  cursor: pointer;
  margin-bottom: 0;
}

/* Azioni form */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-secondary:focus,
.form-actions .btn-primary:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Abbr per campo obbligatorio */
.form-container abbr[title] {
  color: #dc3545;
  text-decoration: none;
  margin-left: 0.25rem;
}

/* Testo no-data */
.no-data {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}
