﻿/* Machine Button Styles */
.add-machine-btn {
    background-color: #f39c12;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-machine-btn:hover {
    background-color: #e67e22;
    color: #fff !important;
}

/* Machine Grid CSS: CSS for Machine card list */
/* Card css */
.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: contain;
    /* Preserves aspect ratio, avoids distortion */
    object-position: center;
    /* Center the image */
    background-color: #f8f9fa;
}

.buy-btn {
    background-color: #f97316;
    color: #fff;
    border: none;
    padding: 7px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.buy-btn:hover {
    background-color: #d96614;
    color: #fff !important;
}

.view-btn {
    background-color: #fbbf24;
    color: #fff;
    border: none;
    padding: 7px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.view-btn:hover {
    background-color: #e5ad21;
    color: #fff !important;
}

.edit-btn {
    background-color: #facc15;
    color: #fff;
    border: none;
    padding: 7px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.edit-btn:hover {
    background-color: #d0aa14;
    color: #fff !important;
}

.submit-btn {
    background-color: #f59f0b;
    color: #fff;
    border: none;
    padding: 7px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #c07d0a;
}

/* ----------------------------------------------- */
/* Machine Modal Form AND View Machine Modal */
.modal-backdrop-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1051;
}

.modal-dialog.modal-lg {
    max-width: 90vw !important;
    width: 90vw !important;
}

.modal-body {
    max-height: 75vh;
    overflow-y: auto;
}

/* ----------------------------------------------- */
/* Main Image Preview from the form AND from View Machine Modal */
.main-image-preview {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
}

.supporting-image-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.supporting-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border: 1px solid #ccc;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
}

/* ----------------------------------------------- */
/* Image Viewer Modal */
.image-viewer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.image-viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-viewer-box {
    width: 90vw;
    height: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-viewer-image {
    width: auto;
    height: 700px;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Close button - now clearly visible outside top-right */
.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

/* Navigation buttons */
.image-viewer-controls {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.image-viewer-controls button {
    background-color: #f39c12;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.image-viewer-controls button:hover {
    background-color: #e67e22;
}


/* Add these styles if they're not already in your machine.css */
.supporting-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    margin: 5px;
}

.main-image-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    cursor: pointer;
    border-radius: 4px;
}

.supporting-image-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-checkbox {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 20px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
}

    .category-checkbox.active {
        background-color: #0d6efd;
        color: white;
    }

    .category-checkbox input {
        margin-right: 5px;
    }

