/* Badge Generator Styles */

/* Canvas Container */
#badge-container {
    position: relative;
    transition: transform 0.2s ease;
}

#badge-container.portrait {
    width: 14rem;
    height: 25rem;
}

#badge-container.landscape {
    width: 21rem;
    height: 21rem;
}

/* Canvas Styling */
#badge-canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    cursor: grab;
    touch-action: none; /* Prevent default touch behaviors */
}

#badge-canvas:active {
    cursor: grabbing;
}

/* Improved Loader */
.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 10px solid lightgray;
    border-top: 10px solid #D69829;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 999999999;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Processing Loader */
#badge-processing-loader {
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 20px;
}

/* Zoom Slider Improvements */
#zoom-slider {
    width: 100%;
    margin-top: 10px;
    accent-color: #D69829;
}

#zoom-slider:focus {
    outline: 2px solid #D69829;
    outline-offset: 2px;
}

/* Error Messages */
.badge-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

/* Share Buttons Improvements */
.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
}

.share-btn {
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.share-btn.whatsapp { background-color: #25D366; }
.share-btn.facebook { background-color: #1877F2; }
.share-btn.twitter { background-color: #1DA1F2; }
.share-btn.linkedin { background-color: #0A66C2; }
.share-btn.email { background-color: #EA4335; }
.share-btn.copy { background-color: #6c757d; }

/* Ticket Cards Improvements */
.ticket-card {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.ticket-card:hover {
    border-color: #D69829;
    box-shadow: 0 4px 12px rgba(214, 152, 41, 0.2);
}

.ticket-card.selected {
    border-color: #D69829;
    background-color: rgba(214, 152, 41, 0.05);
}

/* Price Display */
.new-price {
    color: #28a745;
    font-weight: bold;
}

.old-price {
    color: #6c757d;
    text-decoration: line-through;
    font-size: 0.9em;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    #badge-container.portrait {
        width: 12rem;
        height: 21rem;
    }
    
    #badge-container.landscape {
        width: 18rem;
        height: 18rem;
    }
    
    .share-buttons {
        justify-content: space-around;
    }
    
    .share-btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
}

/* Accessibility Improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus Indicators */
.check_ticket:focus + label,
.form-control:focus,
button:focus,
.share-btn:focus {
    outline: 2px solid #D69829;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    #badge-canvas {
        border: 2px solid #000;
    }
    
    .loader {
        border-color: #000;
        border-top-color: #D69829;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .loader {
        animation: none;
    }
    
    .share-btn:hover {
        transform: none;
    }
    
    #badge-container {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .share-buttons,
    #zoom-slider,
    .loader,
    #badge-processing-loader {
        display: none !important;
    }
} 