/* WP Booking Crypto - Frontend Styles */

.wpbc-container {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
}

.wpbc-hidden { display: none !important; }

/* Steps */
.wpbc-step-title {
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
    color: #1d2327;
}

/* Service Cards */
.wpbc-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.wpbc-service-card {
    border: 2px solid #dcdcde;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.wpbc-service-card:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.15);
}

.wpbc-service-card.selected {
    border-color: #2271b1;
    background: #f0f6fc;
}

.wpbc-service-card h4 {
    margin: 0 0 8px;
    font-size: 1.1em;
}

.wpbc-service-desc {
    color: #646970;
    font-size: 0.9em;
    margin: 0 0 12px;
}

.wpbc-service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpbc-price {
    font-weight: 700;
    color: #2271b1;
    font-size: 1.1em;
}

.wpbc-duration {
    color: #646970;
    font-size: 0.9em;
}

/* Date & Slots */
.wpbc-datetime-picker { margin-bottom: 20px; }

.wpbc-slots-container label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

/* ─── Calendar ─── */
.wpbc-calendar {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 20px;
    max-width: 420px;
    margin-bottom: 16px;
}

.wpbc-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.wpbc-cal-title {
    font-size: 1.15em;
    font-weight: 700;
    color: #1d2327;
}

.wpbc-cal-nav {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f0f6fc;
    color: #2271b1;
    font-size: 1.4em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    line-height: 1;
}

.wpbc-cal-nav:hover {
    background: #2271b1;
    color: #fff;
}

.wpbc-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    text-align: center;
    margin-bottom: 8px;
}

.wpbc-cal-weekdays span {
    font-size: 0.75em;
    font-weight: 700;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 0;
}

.wpbc-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.wpbc-cal-day {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    color: #1d2327;
}

.wpbc-cal-empty {
    cursor: default;
}

.wpbc-cal-disabled {
    color: #c3c4c7;
    cursor: not-allowed;
}

.wpbc-cal-available {
    color: #135e96;
    font-weight: 700;
}

.wpbc-cal-available:hover {
    background: #f0e6f0;
}

.wpbc-cal-today {
    position: relative;
}

.wpbc-cal-today::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #2271b1;
}

.wpbc-cal-selected {
    background: #8b1a4a !important;
    color: #fff !important;
    font-weight: 700;
}

.wpbc-cal-selected::after {
    display: none;
}

/* ─── Timezone ─── */
.wpbc-timezone-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 16px;
    font-size: 0.9em;
}

.wpbc-tz-icon {
    font-size: 1.2em;
}

.wpbc-timezone-row label {
    font-weight: 600;
    color: #646970;
    white-space: nowrap;
}

.wpbc-timezone-row select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 0.95em;
    color: #1d2327;
    background: #fff;
    max-width: 320px;
    cursor: pointer;
}

.wpbc-timezone-row select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* ─── Time Slots ─── */
.wpbc-slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.wpbc-slot {
    padding: 10px 18px;
    border: 2px solid #dcdcde;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s ease;
    background: #fff;
}

.wpbc-slot:hover { border-color: #2271b1; }

.wpbc-slot.selected {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Form Fields */
.wpbc-form-fields { margin-bottom: 20px; }

.wpbc-field {
    margin-bottom: 16px;
}

.wpbc-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.wpbc-field input,
.wpbc-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.wpbc-field input:focus,
.wpbc-field textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Payment Methods */
.wpbc-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.wpbc-payment-option {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fff;
}

.wpbc-payment-option:hover {
    border-color: #2271b1;
}

.wpbc-payment-option input[type="radio"] {
    margin-right: 12px;
}

.wpbc-payment-option input[type="radio"]:checked + .wpbc-payment-label {
    color: #2271b1;
    font-weight: 600;
}

.wpbc-payment-label .dashicons {
    margin-right: 8px;
    vertical-align: middle;
}

/* Summary Box */
.wpbc-summary-box {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.wpbc-summary-box h4 {
    margin: 0 0 10px;
}

.wpbc-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e0e0e0;
}

.wpbc-summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
}

/* Buttons */
.wpbc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    font-weight: 600;
    margin: 8px 8px 8px 0;
    transition: all 0.15s ease;
}

.wpbc-btn-back {
    background: #f0f0f1;
    color: #1d2327;
}

.wpbc-btn-back:hover { background: #dcdcde; }

.wpbc-btn-next, .wpbc-btn-submit {
    background: #2271b1;
    color: #fff;
}

.wpbc-btn-next:hover, .wpbc-btn-submit:hover {
    background: #135e96;
}

.wpbc-btn-submit:disabled {
    background: #a7aaad;
    cursor: not-allowed;
}

/* Confirmation */
.wpbc-confirmation { text-align: center; }

.wpbc-success-icon {
    width: 64px;
    height: 64px;
    background: #00a32a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.wpbc-instructions-box {
    background: #fef8ee;
    border: 1px solid #dba617;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    white-space: pre-line;
    line-height: 1.6;
}

.wpbc-notice {
    padding: 12px 16px;
    background: #fef8ee;
    border-left: 4px solid #dba617;
    margin: 10px 0;
}

/* Badges */
.wpbc-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.wpbc-badge-pending { background: #fef8ee; color: #996800; }
.wpbc-badge-confirmed { background: #edfaef; color: #00701a; }
.wpbc-badge-cancelled { background: #fcecec; color: #8b0000; }
.wpbc-badge-completed { background: #f0f6fc; color: #135e96; }
.wpbc-badge-failed { background: #fcecec; color: #8b0000; }
.wpbc-badge-refunded { background: #f0f0f1; color: #50575e; }

/* Confirmation page */
.wpbc-confirmation-page { max-width: 600px; margin: 20px auto; }

.wpbc-details-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.wpbc-details-table th,
.wpbc-details-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.wpbc-details-table th {
    width: 40%;
    color: #646970;
    font-weight: 600;
}

/* Loading */
.wpbc-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.wpbc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #dcdcde;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: wpbc-spin 0.8s linear infinite;
}

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

/* ─── Payment Proof Upload ─── */

.wpbc-proof-upload-section {
    margin-top: 24px;
    padding: 24px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    text-align: left;
}

.wpbc-proof-upload-section h4 {
    margin: 0 0 8px;
    color: #1d2327;
}

.wpbc-proof-desc {
    color: #646970;
    font-size: 0.9em;
    margin: 0 0 16px;
}

.wpbc-proof-or {
    text-align: center;
    color: #646970;
    margin: 16px 0;
    font-weight: 600;
    font-size: 0.9em;
}

.wpbc-field-hint {
    color: #646970;
    font-size: 0.8em;
    margin-top: 4px;
}

.wpbc-proof-msg {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.wpbc-proof-msg-success {
    background: #edfaef;
    color: #00701a;
    border: 1px solid #00a32a;
}

.wpbc-proof-msg-error {
    background: #fcecec;
    color: #8b0000;
    border: 1px solid #cc1818;
}

.wpbc-proof-submitted-notice {
    margin-top: 20px;
    padding: 20px;
    background: #edfaef;
    border: 1px solid #00a32a;
    border-radius: 8px;
    text-align: center;
}

.wpbc-proof-submitted-notice.wpbc-proof-confirmed {
    background: #f0f6fc;
    border-color: #2271b1;
}

.wpbc-proof-check {
    width: 48px;
    height: 48px;
    background: #00a32a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 12px;
}

.wpbc-proof-submitted-notice p {
    margin: 0;
    color: #00701a;
    font-weight: 500;
}

.wpbc-proof-confirmed .wpbc-proof-check {
    background: #2271b1;
}

.wpbc-proof-confirmed p {
    color: #135e96;
}

/* Standalone proof page */
.wpbc-proof-page {
    position: relative;
}

.wpbc-proof-page .wpbc-summary-box {
    margin-bottom: 20px;
}

/* File input styling */
.wpbc-proof-upload-section input[type="file"] {
    padding: 8px;
    border: 2px dashed #c3c4c7;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.wpbc-proof-upload-section input[type="file"]:hover {
    border-color: #2271b1;
}

/* Admin proof column */
.wpbc-proof-hash-display {
    display: inline-block;
    font-size: 12px;
    color: #50575e;
    word-break: break-all;
    max-width: 140px;
}

/* Responsive */
@media (max-width: 480px) {
    .wpbc-services-grid { grid-template-columns: 1fr; }
    .wpbc-btn { width: 100%; margin: 8px 0; }
    .wpbc-proof-upload-section { padding: 16px; }
    .wpbc-calendar { padding: 14px; }
    .wpbc-cal-day { font-size: 0.85em; }
    .wpbc-timezone-row { flex-wrap: wrap; }
    .wpbc-timezone-row select { max-width: 100%; }
}
