/**
 * Way2Rentals Payment Methods Component
 * Relies on card-selectable.css for base card styling (border, hover, selected)
 *
 * @package Way2Rentals
 */

/* Grid layout for panel body */
.w2r-gateway-option + .w2r-gateway-option {
    margin-top: 0;
}

/* One column: the pay button sits right under the list (issue #100) */
.w2r-payment-methods-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

/* Gateway card layout (extends .w2r-card-selectable) */
.w2r-gateway-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    gap: 1rem;
}

/* Apple Pay stays hidden until payment-page.js confirms device support */
.w2r-gateway-option[hidden] {
    display: none;
}

.w2r-gateway-option input[type="radio"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
}

/* Payment label with icon + info */
.w2r-payment-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

/* Icon with colored background */
.w2r-payment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}

.w2r-payment-icon i {
    font-size: 1.25rem;
    color: var(--color-btn-text);
}

/* Logo variant (PayPal, Stripe with uploaded logos) */
.w2r-payment-icon--logo {
    background-color: var(--color-bg-panel);
    padding: 6px;
}

.w2r-payment-icon--logo .w2r-payment-logo {
    max-height: 32px;
    max-width: 32px;
    object-fit: contain;
}

/* Title and description container */
.w2r-payment-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.w2r-payment-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-main);
    line-height: 1.3;
}

.w2r-payment-description {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
    line-height: 1.3;
}

/* Legacy support - standalone logos without icon wrapper */
.w2r-payment-logo {
    max-height: 32px;
    max-width: 80px;
    object-fit: contain;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .w2r-gateway-option {
        padding: 0.875rem 1rem;
    }

    .w2r-payment-icon {
        width: 40px;
        height: 40px;
    }

    .w2r-payment-icon i {
        font-size: 1.1rem;
    }

    .w2r-payment-title {
        font-size: 0.9rem;
    }

    .w2r-payment-description {
        font-size: 0.7rem;
    }
}

/* ============================================================
   Payment page (issue #100): MB WAY phone, pay row
   ============================================================ */
/* MB WAY phone, inline under the MB WAY row */
.w2r-mbway-fields {
    padding: 0.25rem 0.25rem 0.5rem;
}

.w2r-mbway-fields[hidden] {
    display: none;
}

/* Step 5: REDUNIQ MB WAY phone, below the method list (issue #100) */
.w2r-payment-phone-field {
    margin: 0.75rem 0 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.w2r-payment-phone-field[hidden] {
    display: none;
}

.w2r-payment-phone-field .w2r-form-group {
    margin-bottom: 0;
}

/* Provider badge: tells apart the same method from two providers (SIBS / REDUNIQ MB WAY) */
.w2r-payment-provider {
    margin-left: auto;
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-bg-panel);
    color: var(--color-text-detail);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
