/**
 * PayTR Checkout Styles - Theme Neutral
 * Minimal styling that respects the theme's design
 */

/* ============================================
   Base - Theme Neutral
   ============================================ */
.paytr-premium-form {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}

/* ============================================
   Saved Cards Section - Subtle Border Only
   ============================================ */
.paytr-saved-cards-section {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid currentColor;
    border-radius: 8px;
    opacity: 0.9;
}

.paytr-section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paytr-saved-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.paytr-saved-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid currentColor;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    opacity: 0.7;
}

.paytr-saved-card-item:hover {
    opacity: 1;
}

.paytr-saved-card-item:has(.paytr-saved-card-radio:checked) {
    opacity: 1;
    border-width: 2px;
}

.paytr-saved-card-radio {
    display: none;
}

.paytr-card-visual {
    display: flex;
    align-items: center;
    flex: 1;
}

/* Card Schema Colors - These are brand standards */
.paytr-card-schema {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paytr-schema-visa {
    background: #1a1f71;
    color: #fff;
}

.paytr-schema-mastercard {
    background: #eb001b;
    color: #fff;
}

.paytr-schema-amex {
    background: #006fcf;
    color: #fff;
}

.paytr-schema-troy {
    background: #00a651;
    color: #fff;
}

.paytr-schema-card {
    background: #666;
    color: #fff;
}

.paytr-card-brand {
    font-size: 12px;
    font-weight: 500;
}

.paytr-card-number {
    font-family: monospace;
    font-size: 13px;
    letter-spacing: 1px;
    margin-left: auto;
}

/* New Card Option */
.paytr-new-card-option {
    border-style: dashed;
}

.paytr-new-card-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 300;
}

.paytr-new-card-text {
    font-weight: 500;
    font-size: 14px;
}

/* ============================================
   CVV Only Section (for saved cards)
   ============================================ */
.paytr-cvv-only-section {
    padding: 16px 0;
}

.paytr-cvv-input {
    max-width: 100px !important;
    text-align: center;
    font-size: 16px !important;
    letter-spacing: 3px;
    font-family: monospace;
}

/* ============================================
   New Card Form - Minimal Enhancements
   ============================================ */
.paytr-new-card-section {
    padding-top: 10px;
}

/* Card Number Row with Brand Display */
.paytr-card-number-row {
    position: relative;
}

.paytr-card-input-wrapper {
    position: relative;
}

.paytr-card-number-input {
    padding-right: 90px !important;
    font-family: monospace;
    letter-spacing: 1px;
}

.paytr-card-brand-display {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.paytr-card-brand-display img {
    height: 20px;
    width: auto;
}

.paytr-card-brand-display .paytr-schema-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.paytr-card-brand-display .paytr-brand-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    background: #f0f0f0;
    color: #333;
}

/* ============================================
   Save Card Toggle - Clean Style
   ============================================ */
.paytr-save-card-row {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid;
    opacity: 0.8;
}

.paytr-save-card-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.paytr-save-card-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.paytr-toggle-slider {
    display: none;
    /* Use native checkbox instead */
}

.paytr-toggle-label {
    font-size: 13px;
}

/* ============================================
   BIN Info Display
   ============================================ */
#paytr-bin-info {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

#paytr-bin-info img {
    height: 24px;
    width: auto;
    border-radius: 3px;
}

.paytr-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
}

.paytr-type {
    font-size: 11px;
    opacity: 0.7;
}

/* ============================================
   Installment Options - Theme Neutral
   ============================================ */
#paytr-installment-options {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid;
    border-radius: 8px;
}

#paytr-installment-options h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

#paytr-installment-options label {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: opacity 0.2s;
}

#paytr-installment-options label:hover {
    opacity: 0.8;
}

#paytr-installment-options input[type="radio"] {
    margin-right: 10px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .paytr-saved-cards-section {
        padding: 12px;
    }

    .paytr-saved-card-item {
        padding: 10px;
    }

    .paytr-card-number {
        font-size: 11px;
    }
}

/* ============================================
   Card Brand Display Below Input
   ============================================ */
.paytr-card-brand-display-below {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    min-height: 32px;
}

.paytr-card-brand-display-below img {
    height: 20px;
    width: auto;
}

.paytr-schema-logo {
    height: 20px;
    width: auto;
}

.paytr-brand-logo {
    height: 20px;
    width: auto;
}

.paytr-schema-text {
    font-weight: 700;
    font-size: 12px;
    padding: 4px 8px;
    background: #333;
    color: #fff;
    border-radius: 4px;
}

/* ============================================
   Validation Error Styles
   ============================================ */
.paytr-invalid {
    border-color: #dc2626 !important;
}

.paytr-error input {
    border-color: #dc2626 !important;
}

.paytr-expiry-error {
    color: #dc2626;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

/* ============================================
   Accepted Cards Section (Bottom of Form)
   ============================================ */
.paytr-accepted-cards {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid;
    opacity: 0.7;
}

.paytr-accepted-title {
    font-size: 12px;
    font-weight: 500;
    display: block;
    margin-bottom: 10px;
}

.paytr-accepted-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.paytr-accepted-logo {
    height: 18px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.paytr-accepted-logo:hover {
    opacity: 1;
}

.paytr-schema-icon {
    height: 20px;
}

.paytr-brand-icon {
    height: 16px;
}