.relay-btn {
  position: relative;

  height: 110px;
  border: none;
  border-radius: 18px;
  background: #555;
  color: white;
  font-size: 20px;
  font-weight: bold;
  touch-action: manipulation;
  user-select: none;
}

.relay-btn.on {
  background: #ffd000;
  color: #000;
}

.relay-id {
  display: block;
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 6px;
}

.relay-state {
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.relay-options-name {
  text-align: center;
  color: white;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 18px;
}

.relay-option-card {
  width: 100%;
  text-align: left;

  background: #111;
  color: white;

  border: none;
  border-radius: 14px;

  padding: 15px;
  margin-bottom: 12px;

  cursor: pointer;
}

.relay-option-card:hover {
  background: #1f1f1f;
}

.relay-option-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.relay-option-card.disabled:hover {
  background: #111;
}

.relay-option-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 6px;
}

.relay-option-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.35;
  margin-bottom: 8px;
}

.relay-option-state {
  font-size: 12px;
  color: #ffcc00;
}

@media (max-width: 700px) {
  .relay-btn {
    height: 100px;
    font-size: 18px;
  }
}

/* -------------------------
   LENYITHATÓ SZEKCIÓK
------------------------- */
.relay-option-header {
  cursor: pointer;
  user-select: none;
}

.timer-section-content {
  margin-top: 12px;
}
/* -------------------------
   RELÉ IDŐZÍTŐ BADGE
------------------------- */
.relay-timer-badge {

  position: absolute;

  top: 4px;
  left: 4px;

  display: flex;
  align-items: center;
  gap: 4px;

  padding: 3px 8px;

  border-radius: 8px;

  background: rgba(0,0,0,0.75);

  color: #ffd000;

  font-size: 12px;
  font-weight: bold;

  pointer-events: none;
}

.timer-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.timer-label-row div {
  width: 24px;
}

.timer-label-row span {
  width: 70px;
  text-align: center;
  color: #aaa;
  font-size: 12px;
}

.timer-inline-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-inline-row input[type="checkbox"] {
  width: 24px;
}

.timer-inline-row input[type="number"] {
  width: 70px;
}


/* -------------------------
   INTERVALLUMOK
------------------------- */
.interval-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #333;
}

.interval-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;

  width: 100%;

  color: white;
  font-weight: normal;
  margin-bottom: 12px;
}

.interval-title input[type="checkbox"] {
  width: 24px;
  margin: 0;
  flex: 0 0 24px;
}

.interval-title span {
  width: auto;
  text-align: left;
  margin: 0;
  flex: 0 0 auto;
}

.interval-label-row,
.interval-input-row {
  display: grid;
  grid-template-columns: 58px 58px 14px 58px 58px;
  gap: 4px;
  align-items: center;
}

.interval-label-row {
  margin-bottom: 6px;
}

.interval-label-row span {
  text-align: center;
  color: #aaa;
  font-size: 12px;
}

.interval-input-row input {
  width: 58px;
  height: 36px;

  background: #222;
  color: white;

  border: 1px solid #444;
  border-radius: 8px;

  text-align: center;
}

.interval-separator {
  text-align: center;
  color: #aaa;
  font-weight: bold;
}

/* -------------------------
   INTERVALLUM BADGE
------------------------- */
.relay-interval-badge {
  position: absolute;

  background: rgba(0,0,0,0.50);

  color: #ffd000;

  border-radius: 8px;

  padding: 4px 6px;

  font-size: 9px;
  line-height: 1.2;

  text-align: left;

  pointer-events: none;
}

.interval-badge-title {
  font-weight: bold;
  margin-bottom: 2px;
}

.interval-A {
  top: 4px;
  left: 4px;
}

.interval-B {
  top: 4px;
  right: 4px;
}

.interval-C {
  bottom: 4px;
  left: 4px;
}

.interval-D {
  bottom: 4px;
  right: 4px;
}