﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    min-height: 100vh;
    padding: 20px;
    color: #2d3748;
}

.form-container {
    width: 95%;
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: white;
    box-shadow: 0 10px 30px rgba(132, 0, 22, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(132, 0, 22, 0.1);
}

h2 {
    font-size: 28px;
    color: #840016;
    margin-bottom: 30px;
    /*padding-bottom: 15px;*/
    /*border-bottom: 2px solid rgba(132, 0, 22, 0.1);*/
    text-align: center;
    font-weight: 800;
    position: relative;
    text-transform: uppercase;
}

    h2::after {
        content: '';
        position: absolute;
        top: 3.3rem;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(45deg, white, #840016, white);
        background-size: 200%;
        border-radius: 15px;
        animation: colorMove 3s linear infinite;
    }

@keyframes colorMove {
    0% {
        background-position: 0%;
    }

    50% {
        background-position: 100%;
    }

    100% {
        background-position: 0%;
    }
}

.icon {
    font-size: 3rem;
    text-align: center;
    width: 100%;
    color: #840016;
    margin-bottom: -15px;
    display: block;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #840016;
        font-size: 0.95rem;
        transition: all 0.3s ease;
    }

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(132, 0, 22, 0.2);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    color: #2d3748;
}

    .form-control:focus {
        border-color: #840016;
        box-shadow: 0 0 0 3px rgba(132, 0, 22, 0.1);
        outline: none;
    }

.barcode-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.scan-camera-button {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: rgba(132, 0, 22, 0.7);
    border-radius: 50%;
    transition: all 0.2s ease;
}

    .scan-camera-button:hover {
        background-color: rgba(132, 0, 22, 0.1);
        color: #840016;
    }

    .scan-camera-button:active {
        transform: translateY(-50%) scale(0.95);
    }

.barcode-input-wrapper .form-control {
    padding-right: 50px;
}

/* Scanner modal styling */
.scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 55, 72, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.scanner-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.scanner-video-container {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
    position: relative;
}

.scanner-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.scanner-button {
    padding: 12px 24px;
    background: #840016;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .scanner-button.cancel {
        background: transparent;
        border: 2px solid rgba(255, 255, 255, 0.3);
        color: white;
    }

    .scanner-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(132, 0, 22, 0.2);
    }

    .scanner-button.cancel:hover {
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }

#reader {
    width: 100% !important;
    background: #000 !important;
    border: none !important;
    overflow: hidden;
    border-radius: 12px;
}

    #reader video {
        object-fit: cover !important;
    }

#reader__scan_region {
    background: none !important;
}

    #reader__scan_region img {
        display: none !important;
    }

.html5-qrcode-element {
    color: white !important;
}

select.form-control {
    appearance: none;
    background-image: url('../Tinapay/roomreserve/sort-down.png');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.capture-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.capture-option {
    padding: 20px;
    border: 2px solid rgba(132, 0, 22, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .capture-option:hover {
        border-color: #840016;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(132, 0, 22, 0.1);
    }

    .capture-option.active {
        border-color: #840016;
        background-color: #840016;
        transform: translateY(-5px);
        color: white;
    }

        .capture-option.active .camera-icon,
        .capture-option.active .upload-icon {
            color: white;
        }

.camera-icon, .upload-icon {
    font-size: 70px;
    margin-bottom: 5px;
    display: block;
    color: #840016;
}

.optionTxt {
    /*font-weight: bold;*/
}

.preview-container {
    position: relative;
    margin: 20px 0;
    border-radius: 16px;
    overflow: hidden;
    background: #1a202c;
    padding: 20px;
}

#videoPreview, #imagePreview {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.media-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.media-button {
    padding: 12px 24px;
    background: #840016;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .media-button:hover {
        background: #6b0012;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(132, 0, 22, 0.2);
    }

    .media-button:active {
        transform: translateY(0);
    }

.btnGroup {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.btn-submit {
    background: linear-gradient(135deg, #840016 0%, #6b0012 100%);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .btn-submit:hover {
        background: linear-gradient(135deg, #6b0012 0%, #840016 100%);
        box-shadow: 0 4px 15px rgba(132, 0, 22, 0.3);
        transform: translateY(-2px);
    }

    .btn-submit:active {
        transform: translateY(0);
    }

#btnClear {
    margin-top: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    color: rgba(150, 147, 147, 0.8);
    transition: all 0.5s ease;
    text-decoration: none;
}

    #btnClear:hover {
        color: #840016;
    }

.error-message, .success-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message {
    background: #fff5f5;
    color: #840016;
    border: 1px solid rgba(132, 0, 22, 0.2);
    display: none;
}

.success-message {
    background: rgba(132, 0, 22, 0.05);
    color: #840016;
    border: 1px solid rgba(132, 0, 22, 0.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 23, 29, 0.6);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

    .modal.show {
        opacity: 1;
    }

.modal-content {
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    margin: 10% auto;
    padding: 2.5rem 2.5rem 1rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    margin-top: 23px;
    transform: scale(0.95) translateY(-30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-content h3 {
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

    .modal-content h3::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, white, #840016, white);
        background-size: 200%;
        animation: gradientMove 3s linear infinite;
    }

@keyframes gradientMove {
    0% {
        background-position: 0%;
    }

    50% {
        background-position: 100%;
    }

    100% {
        background-position: 0%;
    }
}


/* Close Button */
.close-modal {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #840016;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

    .close-modal:hover {
        background: #e2e8f0;
        color: #1e293b;
        transform: rotate(90deg);
    }

    .close-modal::before {
        content: '';
        font-family: Arial, sans-serif;
        font-weight: 300;
    }

/* Error List */
.errorContainer {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
}

.error-list {
    list-style-type: none;
    padding: 0;
    margin: 1rem 0;
}

    .error-list li {
        color: #dc2626;
        background: #fef2f2;
        margin-bottom: 0.75rem;
        padding: 1rem 1.25rem;
        border-radius: 8px;
        font-size: 0.925rem;
        display: flex;
        align-items: center;
        transform: translateX(-10px);
        opacity: 0;
        animation: slideIn 0.3s ease forwards;
    }

        .error-list li::before {
            content: '!';
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            background: #dc2626;
            color: white;
            border-radius: 50%;
            margin-right: 12px;
            font-size: 0.75rem;
            font-weight: bold;
        }

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .modal-content {
        margin: 5% auto;
        padding: 1.5rem;
        width: 95%;
    }

    .error-list li {
        font-size: 0.875rem;
        padding: 0.875rem 1rem;
    }
}

/* Add animation delay for each error item */
.error-list li:nth-child(1) {
    animation-delay: 0.1s;
}

.error-list li:nth-child(2) {
    animation-delay: 0.2s;
}

.error-list li:nth-child(3) {
    animation-delay: 0.3s;
}

.error-list li:nth-child(4) {
    animation-delay: 0.4s;
}

.error-list li:nth-child(5) {
    animation-delay: 0.5s;
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(132, 0, 22, 0.1);
    border-top: 4px solid #840016;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Camera Interface Enhancements */
#cameraInterface {
    position: relative;
    background: #1a202c;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.camera-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    pointer-events: none;
}

.camera-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    pointer-events: none;
}

    .camera-grid::before,
    .camera-grid::after {
        content: '';
        position: absolute;
        background: rgba(255, 255, 255, 0.2);
    }

    .camera-grid::before {
        left: 33.33%;
        width: 1px;
        height: 100%;
        box-shadow: 8.33vw 0 rgba(255, 255, 255, 0.2);
    }

    .camera-grid::after {
        top: 33.33%;
        height: 1px;
        width: 100%;
        box-shadow: 0 8.33vh rgba(255, 255, 255, 0.2);
    }

/* File Upload Enhancement */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    height: 60px;
    overflow: hidden;
}

    .file-upload-wrapper input[type="file"] {
        position: absolute;
        left: 0;
        top: 0;
        opacity: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
    }

.file-upload-button {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    border: 2px dashed #840016;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #840016;
    font-weight: 500;
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover .file-upload-button {
    background: rgba(132, 0, 22, 0.05);
    border-style: solid;
}

/* Image Preview Enhancements */
.preview-frame {
    position: relative;
    padding: 20px;
    background: #1a202c;
    border-radius: 16px;
    margin: 20px 0;
    overflow: hidden;
}

    .preview-frame::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #840016, #6b0012);
    }

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .form-container {
        width: 100%;
        margin: 0;
        border-radius: 0;
        padding: 20px 20px 30px;
    }

    .capture-options {
        grid-template-columns: 1fr;
    }

    .media-button {
        width: 100%;
    }

    h2 {
        font-size: 24px;
    }
}

/* Animation Effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeIn 1s ease forwards;
}

    .form-group:nth-child(n) {
        animation-delay: calc(n * 0.1s);
    }


.custom-file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-upload {
    background: linear-gradient(90deg, #840016 0%, #d4a373 100%);
    background-size: 200% 200%;
    border: none;
    color: white;
    padding: 10px 50px 3px;
    font-size: 30px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    .btn-upload::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(-90deg, #d4a373 30%, white 100%);
        background-size: 200% 200%;
        opacity: 0;
        transition: opacity 0.5s ease;
        z-index: -1;
    }

    .btn-upload:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        outline: 1px solid #840016;
        color: #840016;
    }

        .btn-upload:hover::before {
            opacity: 1;
        }

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 75% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn-upload {
    animation: gradientAnimation 5s ease-in-out infinite;
}

.file-name {
    font-size: 18px;
    color: #666;
    font-style: italic;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    border: 2px solid black;
    padding: 0.45rem 0.5rem 0.45rem;
    width: 83%;
    border-radius: 7px;
}

.hidden-file-input {
    display: none;
}


*::-webkit-scrollbar {
    width: 8px;
    height: 5px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: #840016;
    border-radius: 4px;
}

