/* Orgelpfeifen Reservierung – Frontend Styles */

.orp-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #333; }

/* Stats */
.orp-stats { display: flex; gap: 12px; margin-bottom: 1.2rem; flex-wrap: wrap; }
.orp-stat  { background: #f5f5f5; border-radius: 6px; padding: 10px 18px; font-size: 13px; color: #555; min-width: 110px; text-align: center; }
.orp-stat span { display: block; font-size: 22px; font-weight: 700; color: #222; line-height: 1.2; }
.orp-stat--free  span { color: #2e7d32; }
.orp-stat--booked span { color: #b71c1c; }

/* Legend */
.orp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 1rem; font-size: 12px; }
.orp-legend-item { display: flex; align-items: center; gap: 5px; color: #555; }
.orp-swatch { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; border: 1px solid rgba(0,0,0,.15); }
.orp-swatch--booked { background: #999; opacity: .5; }

/* Table */
.orp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e0e0e0; border-radius: 6px; }
.orp-table { border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.orp-table th, .orp-table td { border: 1px solid #e0e0e0; }

.orp-corner { position: sticky; left: 0; top: 0; z-index: 4; background: #f0f0f0;
    padding: 4px 8px; font-weight: 600; font-size: 10px; color: #666; min-width: 140px;
    border-right: 2px solid #ccc; }
.orp-corner-tones, .orp-corner-reg { display: block; }

.orp-col-header { position: sticky; top: 0; z-index: 2; background: #f5f5f5;
    text-align: center; padding: 3px 2px; font-size: 10px; font-weight: 600;
    color: #555; min-width: 22px; }

.orp-row-header { position: sticky; left: 0; z-index: 1; background: #f5f5f5;
    padding: 4px 8px; font-size: 11px; font-weight: 600; text-align: left;
    color: #333; border-right: 2px solid #ccc; }

.orp-cell { width: 22px; height: 22px; cursor: pointer; transition: opacity .12s, outline .1s; }
.orp-cell--empty  { background: #f9f9f9 !important; cursor: default; }
.orp-cell--booked { opacity: .4; cursor: not-allowed; position: relative; }
.orp-cell--booked::after {
    content: '✓'; position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center; font-size: 9px; color: #fff;
    display: grid; place-items: center;
}
.orp-cell:not(.orp-cell--empty):not(.orp-cell--booked):hover {
    opacity: .75; outline: 2px solid #333; outline-offset: -2px; z-index: 1; position: relative;
}

/* Modal overlay */
.orp-modal-bg {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.orp-modal {
    background: #fff; border-radius: 10px; padding: 28px 32px;
    width: 400px; max-width: 100%; position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
}
.orp-modal-close {
    position: absolute; top: 12px; right: 14px; background: none; border: none;
    font-size: 22px; color: #999; cursor: pointer; line-height: 1; padding: 0;
}
.orp-modal-close:hover { color: #333; }
.orp-modal h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.orp-modal-sub { margin: 0 0 10px; font-size: 13px; color: #666; }
.orp-price-tag {
    display: inline-block; background: #e8f4fd; color: #1565c0;
    border-radius: 6px; padding: 6px 12px; font-size: 14px; font-weight: 700;
    margin-bottom: 16px;
}
.orp-modal label { display: block; font-size: 12px; color: #555; margin: 12px 0 4px; font-weight: 600; }
.orp-required { color: #d32f2f; }
.orp-modal input[type="text"],
.orp-modal input[type="email"],
.orp-modal select {
    width: 100%; padding: 9px 12px; border: 1px solid #ccc; border-radius: 6px;
    font-size: 14px; box-sizing: border-box; transition: border-color .15s;
}
.orp-modal input:focus, .orp-modal select:focus {
    outline: none; border-color: #1565c0; box-shadow: 0 0 0 3px rgba(21,101,192,.15);
}
.orp-datenschutz { font-size: 11px; color: #999; margin: 12px 0 0; line-height: 1.5; }
.orp-modal-btns { display: flex; gap: 8px; margin-top: 16px; }
.orp-btn-primary {
    flex: 1; padding: 10px; background: #1565c0; color: #fff;
    border: none; border-radius: 6px; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: background .15s;
}
.orp-btn-primary:hover { background: #0d47a1; }
.orp-btn-primary:disabled { background: #90a4ae; cursor: wait; }
.orp-btn-cancel {
    padding: 10px 18px; background: #fff; color: #555;
    border: 1px solid #ccc; border-radius: 6px; font-size: 14px; cursor: pointer;
}
.orp-btn-cancel:hover { background: #f5f5f5; }
.orp-error { color: #d32f2f; font-size: 13px; margin-top: 10px; }

/* Success */
.orp-success-icon { text-align: center; font-size: 48px; color: #2e7d32; margin-bottom: 12px; }
#orp-success p { font-size: 15px; color: #333; line-height: 1.6; text-align: center; }
.orp-zahlung-info {
    margin-top: 16px; padding: 14px; background: #f5f5f5;
    border-radius: 6px; font-size: 13px; line-height: 1.7;
}
.orp-pay-btn {
    display: inline-block; margin-top: 10px; padding: 10px 20px;
    background: #0070ba; color: #fff; border-radius: 6px; text-decoration: none;
    font-weight: 700; font-size: 14px;
}
.orp-pay-btn:hover { background: #005ea6; color: #fff; }

@media (max-width: 600px) {
    .orp-modal { padding: 20px 16px; }
    .orp-stats { gap: 8px; }
    .orp-stat  { padding: 8px 12px; font-size: 12px; }
}
