/* Additional custom styles for pay.movity.it */

#payment-element iframe {
    border-radius: 16px;
}

#qr-reader {
    border: none !important;
    border-radius: 16px;
    overflow: hidden;
}

#qr-reader__dashboard_section {
    padding: 0 !important;
}

#qr-reader__dashboard_section_csr {
    text-align: center !important;
}

#qr-reader__dashboard_section_csr select,
#qr-reader__dashboard_section_csr button {
    border-radius: 12px !important;
}

@media (max-width: 640px) {
    #qr-reader video {
        border-radius: 12px;
    }
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--page-bg) inset !important;
    -webkit-text-fill-color: var(--dark-text) !important;
}

@media (prefers-color-scheme: dark) {
    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 30px #021018 inset !important;
        -webkit-text-fill-color: #E6F7F3 !important;
    }
    .StripeElement {
        color: #E6F7F3 !important;
    }
}

.step-enter {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-card {
    flex: 1;
    background: rgba(var(--muted-rgb), 0.08);
    border: 2px solid rgba(var(--muted-rgb), 0.12);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all .5s;
}

.info-value {
    font-size: 35px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

.info-unit {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.7;
}

.info-label {
    font-size: 18px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.charging-info {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.connector-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0);
}

/* Receipt printer animation */
/* White receipt paper — always white, thermal-paper style */
.receipt-paper {
    background: #fff;
    border: 1px solid #ddd;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow:
        0 4px 12px rgba(0,0,0,0.08),
        0 8px 24px rgba(0,0,0,0.05);
}

.receipt-paper.open {
    max-height: 3000px;
    padding: 0;
}

.receipt-content {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #333;
    padding: 16px 20px 20px;
}

.receipt-content .receipt-header {
    text-align: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px dashed #ccc;
}

.receipt-content .receipt-header img {
    height: 28px;
    margin-bottom: 6px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.receipt-content .receipt-header .company-info {
    font-size: 10px;
    color: #888;
    line-height: 1.4;
}

.receipt-content .receipt-divider {
    border-top: 2px dashed #ccc;
    margin: 10px 0;
}

.receipt-content .receipt-divider-dots {
    border-top: 1px dotted #ccc;
    margin: 8px 0;
}

.receipt-content .receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 2px 0;
}

.receipt-content .receipt-row .label {
    color: #777;
    font-size: 11px;
    flex-shrink: 0;
}

.receipt-content .receipt-row .value {
    font-weight: 700;
    text-align: right;
    color: #222;
    font-size: 12px;
}

.receipt-content .receipt-row.receipt-row-sm .label,
.receipt-content .receipt-row.receipt-row-sm .value {
    font-size: 10px;
}

.receipt-content .receipt-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 6px;
    font-size: 15px;
    border-top: 3px double #999;
    margin-top: 8px;
}

.receipt-content .receipt-total .label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #222;
}

.receipt-content .receipt-total .value {
    font-size: 18px;
    font-weight: 900;
    color: #111;
}

.receipt-content .receipt-footer {
    text-align: center;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 2px dashed #ccc;
    font-size: 10px;
    color: #888;
    line-height: 1.5;
    letter-spacing: 0.5px;
}

/* Three-column table in receipt */
.receipt-content .receipt-table {
    margin: 8px 0;
}

.receipt-content .receipt-table-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    padding: 4px 0;
    border-bottom: 1px solid #ddd;
}

.receipt-content .receipt-table-header span:last-child {
    text-align: right;
}

.receipt-content .receipt-table-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 6px 0;
    align-items: start;
}

.receipt-content .receipt-table-desc {
    font-size: 11px;
    color: #222;
}

.receipt-content .receipt-table-detail {
    font-size: 9px;
    color: #888;
}

.receipt-content .receipt-table-vat {
    font-size: 11px;
    font-weight: 700;
    color: #222;
}

.receipt-content .receipt-table-price {
    font-size: 11px;
    font-weight: 700;
    color: #222;
    text-align: right;
    white-space: nowrap;
}

.receipt-content .receipt-vat-note {
    font-size: 9px;
    color: #888;
    text-align: right;
    margin-top: -4px;
    padding-bottom: 4px;
}

/* Payment section within receipt */
.receipt-content .receipt-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    text-align: center;
    margin: 8px 0 4px;
}

@keyframes receiptGlow {
    0% { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
    50% { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
    100% { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
}

.receipt-paper.open {
    animation: receiptGlow 3s ease-in-out 0.5s;
}

.connector-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.connector-grid[data-count="1"] { grid-template-columns: 1fr; }
.connector-grid[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.connector-grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.connector-grid[data-count="4"] { grid-template-columns: repeat(2, 1fr); }
.connector-grid[data-count="5"] { grid-template-columns: repeat(3, 1fr); }
.connector-grid[data-count="6"] { grid-template-columns: repeat(3, 1fr); }
.connector-grid:not([data-count]) { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 480px) {
    .connector-grid[data-count="3"],
    .connector-grid[data-count="4"],
    .connector-grid[data-count="5"],
    .connector-grid[data-count="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

.connector-option.selected {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
}

.connector-option:not(.selected):hover {
    border-color: var(--accent);
}

.connector-occupied {
    border-color: rgba(var(--danger-rgb, 220,53,69), 0.3);
    background: rgba(var(--danger-rgb, 220,53,69), 0.05);
    opacity: 0.85;
}

@media (max-width: 640px) {
    .info-value {
        font-size: 24px;
    }
    .info-label {
        font-size: 14px;
    }
    .info-unit {
        font-size: 14px;
    }
.terms-highlight {
    animation: termsPulse 2s ease;
}

@keyframes termsPulse {
    0%, 100% { background-color: transparent; }
    20%, 50% { background-color: rgba(255, 107, 107, 0.12); border-radius: 12px; }
}

.info-card {
        padding: 14px;
    }
}

.conn-status {
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.status-available {
    color: var(--accent-2);
    background: rgba(var(--accent2-rgb), 0.12);
}

.status-occupied {
    color: var(--danger);
    background: rgba(var(--danger-rgb, 220,53,69), 0.1);
}

@media (prefers-color-scheme: dark) {
    .connector-icon {
        filter: brightness(0) invert(1);
    }
}
