/**
 * Veloxity Badge Printing Widget Styles
 */

/* Container */
.vlx-badge-printing {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
}

.vlx-badge-printing *,
.vlx-badge-printing *::before,
.vlx-badge-printing *::after {
    box-sizing: border-box;
}

/* Error message for admins */
.vlx-bp-error {
    padding: 15px 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    text-align: center;
}

/* Screens */
.vlx-bp-screen {
    width: 100%;
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Screen Animations */
@keyframes vlx-bp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes vlx-bp-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes vlx-bp-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes vlx-bp-bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Start Screen */
.vlx-bp-start-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.vlx-bp-start-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    box-sizing: border-box;
    /* Minimal defaults - Elementor controls these properties */
    align-items: center;
    justify-content: center;
    animation: vlx-bp-fadeIn 0.3s ease-out;
}

.vlx-bp-start-label {
    margin: 0 0 30px;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    animation: vlx-bp-slideUp 0.4s ease-out 0.1s both;
}

.vlx-bp-start-btn {
    animation: vlx-bp-slideUp 0.4s ease-out 0.2s both;
}

/* Reset start button styles so Elementor can fully control them */
.vlx-bp-button.vlx-bp-start-btn {
    background: none;
    color: inherit;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
}

/* Search Form */
.vlx-bp-search-form {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vlx-bp-search-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    box-sizing: border-box;
    /* Minimal defaults - Elementor controls these properties */
    align-items: center;
    justify-content: center;
    animation: vlx-bp-fadeIn 0.3s ease-out;
}

/* Staggered animations for search form elements */
.vlx-bp-search-container .vlx-bp-search-icon {
    animation: vlx-bp-scaleIn 0.5s ease-out;
}

.vlx-bp-search-container .vlx-bp-search-title {
    animation: vlx-bp-slideUp 0.4s ease-out 0.1s both;
}

.vlx-bp-search-container .vlx-bp-search-subtitle {
    animation: vlx-bp-slideUp 0.4s ease-out 0.15s both;
}

.vlx-bp-search-container .vlx-bp-form {
    animation: vlx-bp-slideUp 0.4s ease-out 0.2s both;
}

.vlx-bp-search-title {
    margin: 0 0 30px;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
}

.vlx-bp-search-subtitle {
    margin: 0 0 20px;
    font-size: 16px;
    color: #666666;
    text-align: center;
}

/* Form */
.vlx-bp-form {
    width: 100%;
}

.vlx-bp-fields {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.vlx-bp-field {
    flex: 1;
}

.vlx-bp-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.vlx-bp-field input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    color: #333333;
}

.vlx-bp-field input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.vlx-bp-field input::placeholder {
    color: #999;
}

/* Buttons */
.vlx-bp-button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.vlx-bp-button:hover {
    opacity: 0.75;
}

.vlx-bp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.vlx-bp-search-btn {
    margin-top: 25px;
}

/* Form buttons container - stacked layout */
.vlx-bp-form-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 25px;
}

.vlx-bp-form-buttons .vlx-bp-button {
    margin-top: 0;
}

.vlx-bp-form-buttons .vlx-bp-rsvp-btn {
    margin-top: 12px;
}

/* Search button loading/searching state */
.vlx-bp-search-btn.vlx-bp-searching {
    pointer-events: none;
    animation: vlx-bp-pulse 1.5s ease-in-out infinite;
}

@keyframes vlx-bp-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* RSVP Button - smaller secondary style */
.vlx-bp-rsvp-btn {
    margin-top: 12px;
    padding: 12px 20px;
    font-size: 14px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* RSVP Form Screen - inherits from .vlx-bp-search-form */

/* Back to search link */
.vlx-bp-back-to-search {
    margin-top: 15px;
    border: none !important;
    outline: none;
}

.vlx-bp-print-btn {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

/* Start Over / Try Again button */
.vlx-bp-startover-btn {
    margin-top: 15px;
}

/* Try Again button (not-found, error states) */
.vlx-bp-tryagain-btn {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

/* Link button */
.vlx-bp-link {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-align: center;
    transition: opacity 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.vlx-bp-link:hover {
    opacity: 0.75;
    color: inherit;
    background: none;
    border: none;
    text-decoration: underline;
    box-shadow: none;
    transform: none;
}

/* Button Icons */
.vlx-bp-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vlx-bp-btn-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vlx-bp-btn-text {
    display: inline-block;
}

/* Button with icon - horizontal layout (left/right) */
.vlx-bp-button.vlx-bp-btn-icon-left,
.vlx-bp-button.vlx-bp-btn-icon-right,
.vlx-bp-link.vlx-bp-btn-icon-left,
.vlx-bp-link.vlx-bp-btn-icon-right {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Button with icon - vertical layout (top) */
.vlx-bp-button.vlx-bp-btn-icon-top,
.vlx-bp-link.vlx-bp-btn-icon-top {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Result Screen */
.vlx-bp-result {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.vlx-bp-result-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    height: 100%;
    /* Minimal defaults - Elementor controls these properties */
    align-items: center;
    justify-content: center;
    animation: vlx-bp-fadeIn 0.3s ease-out;
}

.vlx-bp-state {
    display: flex;
    flex-direction: column;
    align-items: inherit;
    text-align: inherit;
    width: 100%;
}

/* Staggered animations for state elements */
.vlx-bp-state .vlx-bp-icon {
    animation: vlx-bp-bounceIn 0.5s ease-out;
}

.vlx-bp-state .vlx-bp-result-title {
    animation: vlx-bp-slideUp 0.4s ease-out 0.1s both;
}

.vlx-bp-state .vlx-bp-result-subtitle {
    animation: vlx-bp-slideUp 0.4s ease-out 0.2s both;
}

.vlx-bp-state .vlx-bp-button {
    animation: vlx-bp-slideUp 0.4s ease-out 0.3s both;
}

.vlx-bp-state .vlx-bp-link {
    animation: vlx-bp-fadeIn 0.4s ease-out 0.4s both;
}

/* Search Icon */
.vlx-bp-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.vlx-bp-search-icon img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Result Icons */
.vlx-bp-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.vlx-bp-icon svg {
    width: 40px;
    height: 40px;
}

.vlx-bp-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Remove default icon background when using custom image */
.vlx-bp-icon:has(img) {
    background: none !important;
    border-radius: 0;
}

.vlx-bp-icon-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: #ffffff;
}

.vlx-bp-icon-info {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #ffffff;
}

.vlx-bp-icon-error {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
    color: #ffffff;
}

/* Result Text */
.vlx-bp-result-title {
    width: 100%;
    margin: 0 0 15px;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.vlx-bp-result-subtitle {
    width: 100%;
    margin: 0 0 25px;
    font-size: 16px;
    color: #666666;
    line-height: 1.5;
}

/* Loading Overlay */
.vlx-bp-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: vlx-bp-fadeInFast 0.2s ease-out;
}

@keyframes vlx-bp-fadeInFast {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Spinner */
.vlx-bp-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: vlx-bp-spin 1s linear infinite, vlx-bp-scaleIn 0.3s ease-out;
}

.vlx-bp-loading-text {
    margin-top: 15px;
    font-size: 16px;
    color: #666;
    animation: vlx-bp-fadeIn 0.3s ease-out 0.1s both;
}

@keyframes vlx-bp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Printing state spinner - inside icon container */
.vlx-bp-printing .vlx-bp-icon {
    background: none;
}

.vlx-bp-printing .vlx-bp-spinner {
    width: 100%;
    height: 100%;
    border-width: 5px;
}

/* Smooth transition to printing state */
.vlx-bp-state.vlx-bp-fading-out {
    animation: vlx-bp-fadeOut 0.25s ease-out forwards;
}

.vlx-bp-state.vlx-bp-fading-in {
    animation: vlx-bp-fadeIn 0.3s ease-out forwards;
}

@keyframes vlx-bp-fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Company Selection List */
.vlx-bp-company-list {
    display: flex;
    flex-direction: column;
    align-items: inherit;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
}

/* Company items styled same as .vlx-bp-button */
.vlx-bp-company-item {
    display: block;
    width: 100%;
    max-width: 50%;
    padding: 16px 24px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s;
    animation: vlx-bp-slideUp 0.3s ease-out both;
}

.vlx-bp-company-item:hover {
    opacity: 0.75;
}

.vlx-bp-company-item:active {
    opacity: 0.6;
}

/* Staggered animations */
.vlx-bp-company-item:nth-child(1) { animation-delay: 0.3s; }
.vlx-bp-company-item:nth-child(2) { animation-delay: 0.35s; }
.vlx-bp-company-item:nth-child(3) { animation-delay: 0.4s; }
.vlx-bp-company-item:nth-child(4) { animation-delay: 0.45s; }
.vlx-bp-company-item:nth-child(5) { animation-delay: 0.5s; }
.vlx-bp-company-item:nth-child(n+6) { animation-delay: 0.55s; }

/* Responsive */
@media (max-width: 600px) {
    .vlx-bp-search-form,
    .vlx-bp-result {
        padding: 25px;
    }

    .vlx-bp-fields {
        flex-direction: column;
    }

    .vlx-bp-search-title,
    .vlx-bp-result-title {
        font-size: 22px;
    }

    .vlx-bp-icon {
        width: 60px;
        height: 60px;
    }

    .vlx-bp-icon svg {
        width: 30px;
        height: 30px;
    }
}

/* High contrast focus states for accessibility */
.vlx-bp-field input:focus-visible,
.vlx-bp-button:focus-visible,
.vlx-bp-link:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}
