/**
 * 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;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    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%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Search Form */
.vlx-bp-search-form {
    padding: 40px;
}

.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-size: 18px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    text-align: center;
}

.vlx-bp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
}

.vlx-bp-button:active {
    transform: translateY(0);
}

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

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

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

.vlx-bp-print-btn:hover {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

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

.vlx-bp-link:hover {
    color: #0073aa;
}

/* Result Screen */
.vlx-bp-result {
    padding: 40px;
}

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

/* 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-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 {
    margin: 0 0 15px;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.vlx-bp-result-subtitle {
    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;
}

/* 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;
}

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

.vlx-bp-loading-text {
    margin-top: 15px;
    font-size: 16px;
    color: #666;
}

/* Printing state spinner */
.vlx-bp-printing .vlx-bp-spinner {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

/* 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;
}
