/**
 * Estilos Frontend - Payment Options Display
 */

:root {
    --pod-primary: #4CAF50;
    --pod-primary-dark: #388E3C;
    --pod-primary-light: #81C784;
    --pod-text-primary: #212121;
    --pod-text-secondary: #757575;
    --pod-bg-light: #F5F5F5;
    --pod-border: #E0E0E0;
    --pod-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --pod-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --pod-radius: 12px;
    --pod-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container Principal */
.pod-payment-options {
    margin: 20px 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pod-payment-options * {
    box-sizing: border-box;
}

/* Opção Individual */
.pod-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid var(--pod-border);
    border-radius: var(--pod-radius);
    transition: var(--pod-transition);
    position: relative;
    overflow: hidden;
}

.pod-option:hover {
    border-color: var(--pod-primary-color, var(--pod-primary));
    box-shadow: var(--pod-shadow-hover);
    transform: translateY(-2px);
}

.pod-option:last-child {
    margin-bottom: 0;
}

/* Ícone */
.pod-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pod-primary-color, var(--pod-primary)) 0%, var(--pod-primary-dark) 100%);
    border-radius: 12px;
    color: white;
    font-size: 24px;
}

.pod-icon svg {
    width: 24px;
    height: 24px;
}

/* Conteúdo */
.pod-content {
    flex: 1;
    min-width: 0;
}

.pod-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--pod-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pod-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--pod-text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.pod-detail {
    font-size: 14px;
    color: var(--pod-text-secondary);
    font-weight: 500;
}

.pod-detail.pod-discount {
    color: var(--pod-primary-color, var(--pod-primary));
    font-weight: 600;
}

/* Botão Ver Todas as Parcelas */
.pod-show-all-installments {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    background: transparent;
    border: 2px solid var(--pod-primary-color, var(--pod-primary));
    border-radius: 8px;
    color: var(--pod-primary-color, var(--pod-primary));
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pod-transition);
}

.pod-show-all-installments:hover {
    background: var(--pod-primary-color, var(--pod-primary));
    color: white;
}

.pod-show-all-installments svg {
    transition: var(--pod-transition);
}

.pod-show-all-installments.active svg {
    transform: rotate(180deg);
}

/* Tabela de Parcelas */
.pod-installments-table {
    margin-top: 16px;
    border-top: 2px solid var(--pod-border);
    padding-top: 16px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pod-installments-table table {
    width: 100%;
    border-collapse: collapse;
}

.pod-installments-table th {
    text-align: left;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pod-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--pod-border);
}

.pod-installments-table td {
    padding: 10px 8px;
    font-size: 14px;
    color: var(--pod-text-primary);
    border-bottom: 1px solid var(--pod-bg-light);
}

.pod-installments-table tr:last-child td {
    border-bottom: none;
}

.pod-installments-table tr:hover {
    background: var(--pod-bg-light);
}

.pod-with-interest,
.pod-no-interest {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.pod-with-interest {
    background: #FFF3E0;
    color: #F57C00;
}

.pod-no-interest {
    background: #E8F5E9;
    color: #2E7D32;
}

/* ========== TEMA MODERNO (Padrão) ========== */
.pod-theme-modern .pod-option {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* ========== TEMA MINIMALISTA ========== */
.pod-theme-minimal .pod-option {
    border: none;
    border-left: 4px solid var(--pod-primary-color, var(--pod-primary));
    border-radius: 4px;
    background: white;
    box-shadow: var(--pod-shadow);
}

.pod-theme-minimal .pod-icon {
    background: transparent;
    color: var(--pod-primary-color, var(--pod-primary));
}

.pod-theme-minimal .pod-option:hover {
    border-left-width: 6px;
}

/* ========== TEMA CARTÕES ========== */
.pod-theme-card .pod-payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.pod-theme-card .pod-option {
    flex-direction: column;
    text-align: center;
    padding: 24px;
    margin-bottom: 0;
    box-shadow: var(--pod-shadow);
}

.pod-theme-card .pod-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

.pod-theme-card .pod-content {
    margin-top: 16px;
}

.pod-theme-card .pod-show-all-installments {
    width: 100%;
    justify-content: center;
}

/* ========== TEMA GRADIENTE ========== */
.pod-theme-gradient .pod-option {
    background: linear-gradient(135deg, var(--pod-primary-color, var(--pod-primary)) 0%, var(--pod-primary-dark) 100%);
    border: none;
    color: white;
}

.pod-theme-gradient .pod-label,
.pod-theme-gradient .pod-value,
.pod-theme-gradient .pod-detail {
    color: white;
}

.pod-theme-gradient .pod-icon {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.pod-theme-gradient .pod-show-all-installments {
    border-color: white;
    color: white;
}

.pod-theme-gradient .pod-show-all-installments:hover {
    background: white;
    color: var(--pod-primary-color, var(--pod-primary));
}

.pod-theme-gradient .pod-installments-table {
    border-top-color: rgba(255, 255, 255, 0.3);
}

.pod-theme-gradient .pod-installments-table th {
    color: rgba(255, 255, 255, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.pod-theme-gradient .pod-installments-table td {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.pod-theme-gradient .pod-installments-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== CORES ESPECÍFICAS ========== */
.pod-pix .pod-icon {
    background: linear-gradient(135deg, #32BCAD 0%, #1A9B8E 100%);
}

.pod-boleto .pod-icon {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    .pod-option {
        padding: 14px;
        gap: 12px;
    }
    
    .pod-icon {
        width: 40px;
        height: 40px;
    }
    
    .pod-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .pod-value {
        font-size: 18px;
    }
    
    .pod-label {
        font-size: 12px;
    }
    
    .pod-detail {
        font-size: 13px;
    }
    
    .pod-theme-card .pod-payment-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .pod-payment-options {
        margin: 16px 0;
    }
    
    .pod-option {
        padding: 12px;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .pod-icon {
        width: 36px;
        height: 36px;
    }
    
    .pod-value {
        font-size: 16px;
    }
    
    .pod-installments-table th,
    .pod-installments-table td {
        padding: 6px 4px;
        font-size: 12px;
    }
}

/* ========== ANIMAÇÕES ========== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pod-option:active {
    animation: pulse 0.3s ease;
}

/* ========== ACESSIBILIDADE ========== */
.pod-option:focus-within {
    outline: 3px solid var(--pod-primary-color, var(--pod-primary));
    outline-offset: 2px;
}

.pod-show-all-installments:focus {
    outline: 2px solid var(--pod-primary-color, var(--pod-primary));
    outline-offset: 2px;
}

/* ========== IMPRESSÃO ========== */
@media print {
    .pod-payment-options {
        page-break-inside: avoid;
    }
    
    .pod-option {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .pod-show-all-installments {
        display: none;
    }
}
