.agc-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.95);
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.agc-loader.agc-loader-hidden {
    opacity: 0;
    pointer-events: none;
}

.agc-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.agc-loader-cartel {
    animation: agc-pulse 2s ease-in-out infinite;
}

.agc-loader-cartel .agc-cartel-svg {
    width: 250px;
    height: auto;
}

@keyframes agc-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.agc-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #2E8B57;
    border-radius: 50%;
    animation: agc-spin 1s linear infinite;
}

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

.agc-loader-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: #2E8B57;
    color: white;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.agc-loader-close:hover {
    background: #1E5631;
    transform: rotate(90deg);
}

.agc-cartel-svg {
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 15px;
}

.agc-cartel-container {
    position: relative;
    display: inline-block;
}

.agc-cartel-container .agc-cartel-svg {
    width: 280px;
}

.agc-cartel-numero {
    position: absolute;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    font-family: Arial, sans-serif;
    font-size: 26px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    pointer-events: none;
}

.agc-cartel-wrapper {
    display: inline-block;
}

.agc-cartel-wrapper.agc-size-small .agc-cartel-svg { width: 180px; }
.agc-cartel-wrapper.agc-size-medium .agc-cartel-svg { width: 280px; }
.agc-cartel-wrapper.agc-size-large .agc-cartel-svg { width: 350px; }

.agc-footer-bar {
    text-align: center;
    padding: 10px 16px;
    margin-top: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    clear: both;
}

.agc-footer-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.agc-footer-code {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    background: #e0f2fe;
    padding: 3px 10px;
    border-radius: 4px;
}

.agc-footer-label {
    font-size: 12px;
    color: #6b7280;
}

body.agc-loader-active {
    overflow: hidden;
}

@media (max-width: 768px) {
    .agc-cartel-container .agc-cartel-svg { width: 200px; }
    .agc-cartel-numero { font-size: 20px; }
    .agc-footer-code { font-size: 12px; }
    .agc-footer-label { font-size: 11px; }
}
