/* Modal Styles */
.wonderful-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.wonderful-modal-content {
    background-color: white;
    padding: 20px;
    width: 90%;
    max-width: 450px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wonderful-modal-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.wonderful-modal-body {
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
}

.wonderful-close {
    background: #1F2A64;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.wonderful-close:hover {
    background: #14204d;
}

/* Button Style */
.wonderful-info-btn {
    display: inline-block;
    text-align: center;
    background: #0073aa;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
    cursor: pointer;
}

.wonderful-info-btn:hover {
    background: #005a87;
}

/* Wallet UI Styles */
.wonderful-wallet-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    /* Constrain card width */
    margin: 0 auto;
    min-height: 400px;
    padding-bottom: 20px;
}

/* Credit card dimensions: aspect ratio ~1.586:1 (85.60mm x 53.98mm) */
.wonderful-bank-card {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1.586 / 1;
    border-radius: 12px;
    /* Rounded on all corners like a real card */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: top 0.4s ease-in-out, transform 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Align content to top */
    text-align: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.wonderful-bank-card:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wonderful-card-selected {
    z-index: 100 !important;
}

/* Bank logo on unselected cards */
.wonderful-bank-card-logo {
    display: block;
    max-height: 60px;
    max-width: 120px;
    height: auto;
    width: auto;
    margin-bottom: 0.75rem;
}

.wonderful-card-logo-full {
    display: block;
    width: 100%;
    height: auto;
    margin-top: -10px !important;
    margin-bottom: 0.75rem;
    object-fit: contain;
    object-position: right;
    /* Align logo content to the right */
}

/* Bank name on card - Overlay top-left */
.wonderful-bank-name {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    z-index: 5;
    pointer-events: none;
    /* Let clicks pass through to card */
    color: inherit;
}

/* Selection message container (hidden by default, shown when selected) */
.wonderful-selection-content {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    flex: 1;
    margin-top: 1rem;
    /* Moved up to accommodate larger logo */
}

.wonderful-card-selected .wonderful-selection-content {
    display: flex;
}

.wonderful-card-selected .wonderful-bank-name {
    display: none;
    /* Hide overlay name when selected because it's in the message */
}

/* Inner card container */
.wonderful-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    position: relative;
}

.wonderful-selection-message {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    font-weight: 500;
    color: inherit;
}

.wonderful-paybybank-logo {
    max-height: 50px !important;
    width: auto;
}

/* Helpers */
.wonderful-hidden {
    display: none !important;
}

.wonderful-back-btn {
    display: block;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #000000;
    background-color: transparent;
    cursor: pointer;
    margin-bottom: 0.5rem;
    text-align: left;
}

.wonderful-back-btn:hover {
    color: #000000;
    text-decoration: underline;
}

/* Recent bank tile logo - override WooCommerce defaults */
.wonderful-recent-bank-logo {
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    box-shadow: none !important;
}