/* 
 * Frontend CSS - assets/css/frontend.css 
 */
.wc-pagarme-split-payment-form {
    margin: 15px 0;
}

.pagarme-payment-method-selector {
    margin: 15px 0;
}

.pagarme-payment-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .pagarme-payment-options {
        flex-direction: column;
        gap: 10px;
    }
}

.pagarme-payment-option {
    flex: 1;
    text-align: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.pagarme-payment-option:hover {
    border-color: #0073aa;
    background-color: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,115,170,0.1);
}

.pagarme-payment-option input[type="radio"] {
    margin-bottom: 8px;
}

.pagarme-payment-option input[type="radio"]:checked + div {
    color: #0073aa;
    font-weight: bold;
}

.pagarme-payment-option:has(input[type="radio"]:checked) {
    border-color: #0073aa;
    background-color: #f0f8ff;
    box-shadow: 0 2px 8px rgba(0,115,170,0.2);
}

.pagarme-credit-card-fields {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.pagarme-credit-card-fields h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.pagarme-field-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .pagarme-field-group {
        flex-direction: column;
        gap: 10px;
    }
}

.pagarme-field {
    flex: 1;
}

.pagarme-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.pagarme-field input,
.pagarme-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.pagarme-field input:focus,
.pagarme-field select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.pagarme-field.error input,
.pagarme-field.error select {
    border-color: #dc3232;
}

.pagarme-field-error {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
}

.pagarme-split-info {
    margin-top: 20px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.pagarme-split-info h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0073aa;
    font-size: 16px;
}

.pagarme-split-breakdown {
    margin-top: 10px;
}

.pagarme-split-breakdown ul {
    margin: 10px 0;
    padding-left: 20px;
}

.pagarme-split-breakdown li {
    margin-bottom: 5px;
    color: #555;
}

.pagarme-split-breakdown small {
    display: block;
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

/* PIX Payment Styles */
.wc-pagarme-split-pix-payment {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.wc-pagarme-split-pix-payment h3 {
    color: #0073aa;
    margin-bottom: 15px;
}

.pix-qr-code {
    margin: 20px 0;
}

.pix-qr-code img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pix-code {
    margin: 20px 0;
}

.pix-code label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.pix-code-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .pix-code-input-group {
        flex-direction: column;
        gap: 10px;
    }
}

.pix-code input {
    flex: 1;
    max-width: 400px;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.pix-copy-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.pix-copy-btn:hover {
    background: #005a87;
}

.pix-copy-btn.copied {
    background: #46b450;
}

.pix-instructions {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.pix-instructions ol {
    text-align: left;
    max-width: 500px;
    margin: 10px auto;
    padding-left: 20px;
}

.pix-instructions li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.pix-expiry-warning {
    color: #e74c3c;
    margin-top: 15px;
    font-weight: bold;
    padding: 10px;
    background: #ffeaea;
    border-radius: 4px;
    border: 1px solid #f5c6c6;
}

/* Loading Styles */
.pagarme-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.pagarme-loading.active {
    display: block;
}

.pagarme-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: pagarme-spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes pagarme-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Messages */
.pagarme-error {
    padding: 10px;
    background: #ffeaea;
    border: 1px solid #f5c6c6;
    border-radius: 4px;
    color: #721c24;
    margin: 10px 0;
}

.pagarme-success {
    padding: 10px;
    background: #eafaf1;
    border: 1px solid #c6f6d5;
    border-radius: 4px;
    color: #1e4620;
    margin: 10px 0;
}

/* Card Brand Icons */
.pagarme-card-brand {
    display: inline-block;
    width: 32px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-left: 10px;
    vertical-align: middle;
}

.pagarme-card-brand.visa {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCA0MCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjI0IiByeD0iNCIgZmlsbD0iIzFBMUY3MSIvPgo8cGF0aCBkPSJNMTYuNzUgN0gxNC4yNUwxMi41IDE3SDE1TDE2Ljc1IDdaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');
}

.pagarme-card-brand.mastercard {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCA0MCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjI0IiByeD0iNCIgZmlsbD0iI0VCMDAxQiIvPgo8Y2lyY2xlIGN4PSIxNiIgY3k9IjEyIiByPSI2IiBmaWxsPSIjRkY1RjAwIi8+CjxjaXJjbGUgY3g9IjI0IiBjeT0iMTIiIHI9IjYiIGZpbGw9IiNGRkY1RjAiLz4KPC9zdmc+Cg==');
}

/* Responsive Design */
@media (max-width: 480px) {
    .pagarme-payment-option {
        padding: 12px;
        font-size: 14px;
    }
    
    .pagarme-credit-card-fields {
        padding: 15px;
    }
    
    .pix-qr-code img {
        max-width: 250px;
    }
    
    .pix-code input {
        font-size: 11px;
        max-width: 100%;
    }
}