/**
 * QR Code Generator Styles
 */

/* Remove gradient background from WordPress column */
.wp-block-column.has-vivid-cyan-blue-to-vivid-purple-gradient-background {
    background: transparent !important;
    background-image: none !important;
}

.qrcode-generator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qrcode-generator-container h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
    text-align: center;
}

.qrcode-input-section {
    margin-bottom: 1.5rem;
}

.qrcode-input-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.qrcode-input-section input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.qrcode-input-section input[type="text"]:focus {
    outline: none;
    border-color: #0073ea;
    box-shadow: 0 0 0 3px rgba(0, 115, 234, 0.1);
}

.qrcode-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.qrcode-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.qrcode-options select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.qrcode-options select:focus {
    outline: none;
    border-color: #0073ea;
    box-shadow: 0 0 0 3px rgba(0, 115, 234, 0.1);
}

.qrcode-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.qrcode-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.qrcode-btn:first-child {
    background: #0073ea;
    color: white;
}

.qrcode-btn:first-child:hover {
    background: #0058b3;
    transform: translateY(-2px);
}

.qrcode-btn:nth-child(2) {
    background: #00c875;
    color: white;
}

.qrcode-btn:nth-child(2):hover {
    background: #00a060;
    transform: translateY(-2px);
}

.qrcode-btn:last-child {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e1e5e9;
}

.qrcode-btn:last-child:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.qrcode-output-section {
    text-align: center;
    margin-bottom: 1.5rem;
    min-height: 200px;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e1e5e9;
}

.qrcode-output-section.has-qrcode {
    display: flex; /* Show when QR code is generated */
}

#qrcode-output {
    display: inline-block;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#qrcode-output canvas {
    display: block;
    margin: 0 auto;
}

.qrcode-status {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 1rem;
}

.qrcode-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.qrcode-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.qrcode-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Copy button styles */
.copy-btn {
    margin-left: 0.5rem;
    padding: 0.5rem 1rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #5a6268;
}

/* Responsive design */
@media (max-width: 768px) {
    .qrcode-generator-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .qrcode-options {
        grid-template-columns: 1fr;
    }
    
    .qrcode-controls {
        flex-direction: column;
    }
    
    .qrcode-btn {
        width: 100%;
        text-align: center;
    }
    
}

/* Loading animation */
.qrcode-loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073ea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* QR code preview styles */
.qr-preview {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Input group styles */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .copy-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 0;
}
