/* GENERAL */
body {
    font-family: Arial, sans-serif;
    background: #ffffff;
    margin: 0;
    padding: 20px;
    -webkit-tap-highlight-color: transparent;
}

/* LOGOS */
.top-logo {
    display: flex;
    justify-content: center;
    margin: 10px 0;
} 

.bottom-logo {
    display: flex;
    justify-content: center;
    margin: 28px 0;
    opacity: 0.5;
}

.top-logo img { width: 300px; }
.bottom-logo img { width: 120px; }

/* TOGGLE ROW */
.toggle-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 26px;
    margin-bottom: 26px;
}

/* CLEAR ICON BUTTON */
.clear-icon-btn {
    background: #f5f5f5;
    border: none;
    padding: 15px 18px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.clear-icon-btn:active {
    background: #cfcfcf;
}

/* TOGGLE */
.toggle-container {
    display: flex;
    justify-content: flex-start;
}

.toggle-track {
    width: 260px;
    height: 45px;
    background: #f5f5f5;
    border-radius: 25px;
    position: relative;
    padding: 3px;
    box-sizing: border-box;
}

.toggle-label {
    position: absolute;
    width: 50%;
    height: 41px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
    z-index: 3;
    font-size: 16px;
    pointer-events: none;
}

.left-label { left: 0; }
.right-label { right: 0; }

.toggle-label.active {
    color: white;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 6px);
    height: calc(100% - 6px);
    background: #0d47a1;
    border-radius: 22px;
    transition: left .25s ease, background-color .35s ease;
    z-index: 2;
}

.toggle-thumb.red {
    background: #b71c1c;
}

/* MACHINE GROUPS */
.machine-wrapper {
    width: 100%;
    min-height: 400px;
}

.machine-group {
    width: 100%;
}

/* IMPORTANT: .hidden stays ONLY for checkout button */
.hidden {
    display: none !important;
}

/* .hide is used everywhere else */
.hide {
    display: none !important;
}

/* MACHINE CARD */
.machine {
    width: 100%;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    position: relative;
}

.machine-card {
    display: grid;
    position: relative;
    overflow: hidden;
    grid-template-columns: 51px 1fr 90px;
    background: linear-gradient(335deg, #ffffff, #ededed);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    align-items: center;
    gap: 20px;
    text-align: left;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    border: 2px solid #f5f5f5;
    transition: border-color .75s ease, border-width 0.75s ease;
}

/* --- LIGHT FLASH EFFECT --- */
.machine-card.flash-reflect::after {
    content: "";
    position: absolute;
    top: -10%;
    left: -150%;
    width: 70%;
    height: 130%;
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    animation: silverFlash 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes silverFlash {
    0%   { left: -150%; opacity: 0; }
    10%  { opacity: 1; }
    50%  { left: 150%; opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

/* MACHINE IMAGE */
.machine-img {
    width: 100%;
    height: 70px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 4px;
}

/* TEXT */
.machine-name { 
    font-weight: bold; 
    font-size: 18px; 
}

.machine-desc { 
    font-size: 15px; 
    color: #555; 
}

.machine-price { 
    font-weight: bold; 
    font-size: 18px;
    color: #2196F3; 
}

/* STATUS BADGES */
.machine-status.available {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

.machine-status {
    text-align: center;
    font-size: 14px;
    padding: 10px 10px;
    border-radius: 6px;
    font-weight: bold;
    color: white;
}

.busy-status {
    background: rgba(249, 115, 22, 0.15);
    color: #b45309;
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.4);
}

.machine-status.offline {
    background: rgba(107, 114, 128, 0.15);
    color: #374151;
    box-shadow: 0 0 0 1px rgba(107, 114, 128, 0.4);
}

/* FINAL STATE SYSTEM */
.machine .machine-card,
.machine .machine-card * {
    opacity: 1 !important;
    filter: none !important;
}

.machine.busy {
    cursor: not-allowed;
    opacity: 1;
}

.machine.offline {
    cursor: not-allowed;
    opacity: 0.4;
}

.machine.available {
    cursor: pointer;
}

.machine.busy .machine-card.flash-reflect::after {
    animation: silverFlash 4s ease-in-out infinite;
}

/* SELECTED */
.machine.selected .machine-card {
    border: 2px solid #0d47a1;
}

/* HITBOX */
.machine-hitbox {
    position: absolute;
    inset: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 5;
}

/* Expandable dryer section */
.dryer-expand {
    grid-column: 1 / -1 !important;
    display: none;
    max-height: 0;
    opacity: 0;
    overflow: hidden;

    padding: 0 12px;
    margin-top: 0;
    position: relative; 
    z-index: 5;

    transition:
        max-height 0.35s ease,
        opacity 0.35s ease,
        padding 0.25s ease,
        margin 0.25s ease;
}

.machine.dryer.expanded .dryer-expand {
    display: block;
    max-height: 70px;
    opacity: 1;
    padding: 0px;
    margin-top: 0px;
}

/* Time selector layout */
.time-selector {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.time-fill { 
    position: absolute; 
    left: 0; 
    right: 0; 
    height: 25px; 
    background: linear-gradient(
        90deg,
        rgba(255, 120, 120, 0.05) 0%,
        rgba(220, 70, 70, 0.1) 50%,
        rgba(190, 40, 40, 0.15) 100%
    );
    border-radius: 4px; 
    z-index: 1; 
    width: 0%; 
    transition: width 0.35s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.time-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #777777;
    color: white;
    border-radius: 30px;
    font-size: 22px;
    cursor: pointer;
}

.time-btn.disabled {
    background: #b5b5b5;
    pointer-events: none;
}


.time-btn:active {
    transform: scale(0.80);
    background: #adadad;
	color: #fff;
    transition: transform 0.05s ease, background-color 0.05s ease;
}

.time-btn, .time-value { 
    position: relative; 
    z-index: 2;
}

.time-value {
    display: inline-block;
    width: 100px;      /* adjust as needed */
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

.time-number {
    font-size: 22px;
    font-weight: bold;
}

.time-unit {
    font-size: 16px;
    opacity: 0.7;
    margin-left: 0px;
    position: relative;
    top: -1px;
    font-weight: normal;
}

/* CHECKOUT BUTTON */
.checkout-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2e2e2e;
    color: white;
    padding: 18px 25px;
    border-radius: 40px;
    font-size: 20px;
    border: none;
    z-index: 10;

    display: flex;
    flex-direction: column;
    align-items: center;

    opacity: 0;
    pointer-events: none;

    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.35s ease,
        opacity 0.35s ease,
        box-shadow 0.15s ease;
}

.checkout-btn.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.checkout-btn.visible:active {
    transform: translateX(-50%) translateY(0) scale(0.90);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    opacity: 0.95;
}



.checkout-btn.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
    pointer-events: none;
}

.checkout-label {
    font-size: 20px;
    font-weight: 700;
}

.checkout-count {
    font-size: 14px;
    opacity: 0.85;
    margin-top: 2px;
}

/* POPUPS, MODALS, SUCCESS, PROCESSING */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-box {
  background: #ffffff;
  padding: 24px 28px;
  border-radius: 14px;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  font-family: system-ui, sans-serif;
}

.popup-message {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #333;
}

.popup-ok-btn {
  background: #0078d4;
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.popup-ok-btn:hover {
  background: #005fa3;
}

/* ORDER SUMMARY */
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 16px;
}

.summary-label {
    flex: 1;
    text-align: left;
    padding-right: 10px;
}

.summary-price {
    min-width: 70px;
    text-align: right;
    font-weight: bold;
}

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 16px 0;
}

.email_label {
    padding-top: 20px;
    font-size: 14px;
}

.email-input {
    width: 92%;
    padding: 12px;
    margin-top: 8px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color .75s ease;
}

.email-input:focus {
    border-color: #2196F3;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hide { display: none; }

.modal-content {
    background: white;
    padding: 30px;
    width: 80%;
    max-width: 350px;
    border-radius: 10px;
    text-align: center;
}

.confirm-btn {
    background: #2196F3;
    color: white;
    padding: 14px;
    width: 100%;
    border: none;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 16px;
}

.close-btn {
    background: #000;
    color: white;
    padding: 14px;
    width: 100%;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 16px;
}

/* SUCCESS POPUP */
.success-popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
}

.success-popup.hide { display: none; }

.success-box {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 320px;
    border-radius: 10px;
    text-align: center;
}

.success-box ul {
    text-align: left;
}

/* PROCESSING PAYMENT SCREEN */
.processing {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.processing.hide {
    display: none;
}

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

.processing-box p {
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
    color: #fff;
}

/* SPINNER */
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Stripe loading spinner (separate from processing spinner) */
.stripe-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
    margin-top: 10px;
}

.stripe-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #ddd;
    border-top-color: #0d47a1;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

/* Stripe element wrapper (hidden initially) */
.stripe-element-wrapper {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    margin-top: 10px;
}

.stripe-element-wrapper.visible {
    display: block;
    opacity: 1;
}

/* Unified modal box layout */
.order-summary-box,
.success-box {
    background: #ffffff;
    padding: 22px 26px;
    width: 90%;
    max-width: 320px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    font-family: system-ui, sans-serif;
}

/* Summary rows */
.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin: 6px 0;
}

.summary-row.total {
    font-weight: bold;
    margin-top: 12px;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
}

/* Totals block */
.summary-totals {
    margin-top: 14px;
    margin-bottom: 10px;
}

/* Overlay */
.popup-overlay,
.success-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
}

.success-popup.hide,
.popup-overlay.hide {
    display: none;
}

/* Success box list alignment */
.success-box ul {
    text-align: left;
}

/* Close button */
.popup-ok-btn {
    background: #0078d4;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 14px;
}

