/* Give Bancard Plugin - Estilos Admin */

/* Configuración de versión global */
.give-bancard-version-config {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
}

.give-bancard-version-config h4 {
    margin-top: 0;
    color: #333;
    font-size: 14px;
}

.give-bancard-version-config .description {
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* Metabox del formulario */
.give-bancard-form-config {
    padding: 15px;
    background: #fff;
}

.give-bancard-version-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.give-bancard-version-indicator.legacy {
    background: #666;
    color: white;
}

.give-bancard-version-indicator.visual {
    background: #0073aa;
    color: white;
}

.give-bancard-version-indicator.default {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
}

/* Indicador en lista de formularios */
.bancard-status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.bancard-status-badge.visual {
    background: #0073aa;
    color: white;
}

.bancard-status-badge.legacy {
    background: #666;
    color: white;
}

.bancard-status-badge.disabled {
    background: #f0f0f0;
    color: #999;
    border: 1px solid #ddd;
}

/* Frontend - Contenedor visual */
#bancard-visual-container {
    margin: 15px 0;
}

.bancard-version-notice {
    background: #e7f3ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #0073aa;
    position: relative;
}

.bancard-version-notice::before {
    content: "💳";
    margin-right: 8px;
}

.bancard-version-notice.legacy {
    background: #f5f5f5;
    border-color: #666;
    color: #333;
}

.bancard-version-notice.legacy::before {
    content: "🔧";
}

/* Iframe container */
#bancard-iframe-container {
    min-height: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
    background: #f9f9f9;
    overflow: hidden;
}

/* Loading animation */
.bancard-loading {
    text-align: center;
    padding: 50px 20px;
    color: #666;
}

.bancard-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s infinite linear;
}

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

/* Error messages */
.bancard-error {
    background: #ffeaea;
    border: 1px solid #dc3232;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
    color: #721c24;
}

.bancard-error strong {
    display: block;
    margin-bottom: 5px;
}

/* Success messages */
.bancard-success {
    background: #eaf7ea;
    border: 1px solid #4caf50;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
    color: #2e7d32;
}

/* Responsive */
@media (max-width: 768px) {
    .give-bancard-version-config {
        padding: 10px;
    }
    
    #bancard-iframe-container {
        min-height: 300px;
    }
    
    .bancard-loading {
        padding: 30px 15px;
    }
}

/* Smooth transitions */
.give-bancard-version-config,
.bancard-version-notice,
#bancard-iframe-container {
    transition: all 0.3s ease;
}

.give-bancard-version-config:hover {
    border-color: #0073aa;
}

/* Focus states for accessibility */
.give-bancard-version-config input:focus,
.give-bancard-version-config select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}