/**
 * Dynamic QR Code Generator - Frontend Styles
 * 
 * @package DynamicQRCodeGenerator
 */

/* QR-Code Container */
.dqcg-qr-code-container {
    display: inline-block;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dqcg-qr-code-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* QR-Code Bild */
.dqcg-qr-code-image {
    margin-bottom: 15px;
}

.dqcg-qr-code {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dqcg-qr-code:hover {
    transform: scale(1.05);
}

/* Download Sektion */
.dqcg-download-section {
    margin-top: 10px;
}

.dqcg-download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.dqcg-download-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.dqcg-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.dqcg-download-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dqcg-download-icon {
    font-size: 16px;
}

.dqcg-loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fehlermeldungen */
.dqcg-error {
    color: #d32f2f;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
}

.dqcg-error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #f44336;
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    max-width: 300px;
    font-size: 14px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal für QR-Code Vergrößerung */
.dqcg-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.dqcg-modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dqcg-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.dqcg-modal-close:hover {
    color: #000;
}

.dqcg-modal img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dqcg-qr-code-container {
        padding: 10px;
        margin: 15px 0;
    }
    
    .dqcg-download-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .dqcg-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 15px;
    }
    
    .dqcg-error-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .dqcg-qr-code-container {
        padding: 8px;
    }
    
    .dqcg-download-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dqcg-qr-code-container {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .dqcg-download-btn {
        background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
    }
    
    .dqcg-download-btn:hover {
        background: linear-gradient(135deg, #434190 0%, #4c1d95 100%);
    }
    
    .dqcg-error {
        background: #742a2a;
        border-color: #c53030;
        color: #fed7d7;
    }
    
    .dqcg-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .dqcg-modal-close {
        color: #a0aec0;
    }
    
    .dqcg-modal-close:hover {
        color: #e2e8f0;
    }
}

/* BricksBuilder Kompatibilität */
.brx-body .dqcg-qr-code-container {
    margin: 0;
}

.brx-body .dqcg-download-btn {
    font-family: inherit;
}

/* JetEngine/Crocoblock Kompatibilität */
.jet-engine-listing .dqcg-qr-code-container {
    margin: 10px 0;
}

.jet-engine-listing .dqcg-download-btn {
    font-size: inherit;
} 