/* --- Globalt --- */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  margin: 2rem;
  color: #333;
  line-height: 1.5;
  background: #f9f9f9;
}

/* --- Formulär --- */
form {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

form > * {
  display: block;
  margin: 0.75rem 0;
}

label {
  font-weight: bold;
  font-size: 0.95rem;
}

input[type="number"],
select {
  width: 100%;
  max-width: 300px;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background: #007acc;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #005fa3;
}

/* --- Filmlista --- */
#results {
  display: flex;
  flex-direction: column;
}

.movie {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.movie img {
  width: 80px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  margin-right: 1rem;
}

.movie div {
  flex: 1;
}

.movie strong {
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.3rem;
}

.movie a {
  color: #007acc;
  text-decoration: none;
}

.movie a:hover {
  text-decoration: underline;
}

.movie p {
  margin: 0.5rem 0;
  color: #555;
}

.movie small {
  font-size: 0.85rem;
  color: #777;
}

/* --- Provider-rader --- */
.movie small.providers-row {
  display: block;
  margin: 0.25rem 0;
}

/* Sätt ut ett comma + space mellan länkar, aldrig före första */
.movie small.providers-row a + a::before {
  content: ", ";
}
/* Årsfilter i rad, med smala selects för 4 siffror */
.year-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.year-filters label {
  white-space: nowrap;
  font-weight: bold;
}

.year-filters select {
  width: auto;
  min-width: 4ch;
  padding: 0.3rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.lds-dual-ring {
  display: inline-block;
  width: 40px;
  height: 40px;
}
.lds-dual-ring:after {
  content: " ";
  display: block;
  width: 32px;
  height: 32px;
  margin: 4px;
  border-radius: 50%;
  border: 4px solid #007bff;
  border-color: #007bff transparent #007bff transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- Mobil --- */
@media (max-width: 600px) {
  .movie {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .movie img {
    width: 100%;
    max-width: 300px;
    margin: 0 0 1rem;
  }

  form,
  button {
    width: 100%;
  }
}
