/**
 * 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;
}

/* Use CSS Grid for 2-column layout on wider screens */
.w2r-panel:has(.w2r-gateway-option) .w2r-panel-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .w2r-panel:has(.w2r-gateway-option) .w2r-panel-body {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 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;
}

.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;
    }
}
