/* General Layout */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #f4f4f9; /* Soft light background */
    color: #333; /* Darker text for contrast */
}

html, body {
    height: 100%; /* Ensure full-height background */
}

.header {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bcv-inputs {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between inputs and labels */
}

.bcv-inputs label {
    color: #000;
    font-weight: bold;
}

.bcv-inputs input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #2c2c2c;
    color: #fff;
    width: 80px; /* Adjust this value as needed */
    text-align: center; /* Optional: center the text */
}

.bcv-inputs button.save {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.bcv-inputs button.save:hover {
    background-color: #45a049;
}

/* Sidebar */
.sidebar {
    background-color: #1e1e1e;
    color: #ffffff;
    width: 200px;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
    padding:20px;
}

.sidebar.active {
    transform: translateX(-200px);
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 20px;
}

.sidebar a {
    display: block;
    text-decoration: none;
    color: #bbbbbb;
    padding: 10px 15px;
    margin: 10px 0;
    background-color: #333333;
    border-radius: 5px;
    text-align: left;
    font-size: 14px;
    transition: background-color 0.3s;
}

.sidebar a:hover {
    background-color: #444444;
}

/* Mobile Header Start */
.mobile-header {
    display: none;
    background-color: #1e1e1e;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.mobile-header h1 {
    margin: 0;
    font-size: 16px;
}

.menu-toggle {
    background-color: #bb86fc;
    color: white;
    border: none;
    padding: 5px 7px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    transition: margin-left 0.3s ease-in-out;
}

.main-content.expanded {
    margin-left: 0;
}

.main-content .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.main-content .table-container {
    overflow-x: auto;
}

.main-content table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    background-color: #1e1e1e;
}

.main-content th,
.main-content td {
    border: 1px solid #444;
    padding: 15px;
    text-align: left;
    color: #fff;
    white-space: nowrap;
}

.main-content td:nth-child(3), /* Ensures word-wrap for the DescripciÃ³n column */
.main-content th:nth-child(3) {
    word-wrap: break-word; /* Wraps long words to the next line */
    white-space: normal; /* Ensures text wraps naturally */
    overflow-wrap: break-word; /* Additional compatibility for wrapping */
}

/* Mobile Header End */

/* Main Content Cotizar Start */
.full-page .main-content2 {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    transition: margin-left 0.3s ease-in-out;
}

.full-page .main-content2.expanded {
    margin-left: 0;
}

.full-page .main-content2 .header2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.full-page .main-content2 .table-container2 {
    overflow-x: auto;
}

.full-page .main-content2 table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    background-color: #1e1e1e;
}

.full-page .main-content2 th,
.full-page .main-content2 td {
    border: 1px solid #444;
    padding: 15px;
    text-align: left;
    color: #fff;
    white-space: nowrap;
}

.full-page .main-content2 td:nth-child(3), /* Ensures word-wrap for the DescripciÃ³n column */
.full-page .main-content2 th:nth-child(3) {
    word-wrap: break-word; /* Wraps long words to the next line */
    white-space: normal; /* Ensures text wraps naturally */
    overflow-wrap: break-word; /* Additional compatibility for wrapping */
}

/* Main Content Cotizar End */

button.edit, button.delete {
    background-color: #bb86fc;
    border: none;
    padding: 10px 15px;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button.edit:hover {
    background-color: #8a5bc6;
}

button.delete:hover {
    background-color: #c84d4d;
}

button.btn-primary {
    background-color: #F1C40F; /* Yellow background */
    border: none;
    padding: 10px 15px;
    color: black;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button.btn-primary:hover {
    background-color: #D4A30A; /* Slightly darker yellow on hover */
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        transform: translateX(-250px);
        margin-top: 40px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }
}

@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
    }
}

/* Hide hamburger icon by default */
.menu-toggle {
    display: none; /* Hidden by default */
}

/* Show hamburger icon only on screens smaller than 768px */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Visible in mobile view */
    }
}

/* Modal Background */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark background */
    overflow: hidden; /* Prevent content overflow */
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease-in-out; /* Smooth fade-in/fade-out */
}

.modal-content {
    background-color: #1e1e1e;
    position: absolute;
    top: -100%; /* Start off-screen */
    left: 50%;
    transform: translateX(-50%);
    padding: 30px; /* Equal padding on all sides */
    border-radius: 10px;
    width: 40%; /* Reduced width to make it narrower */
    max-width: 500px; /* Set a maximum width for larger screens */
    color: #fff;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    transition: top 0.4s ease-in-out; /* Smooth slide-in effect */
}

/* When modal is active */

.modal.show {
    display: block; /* Make modal visible */
    opacity: 1; /* Fade-in effect */
}

.modal-content.show {
    top: 10%; /* Slide to visible position */
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 20px;
}

.modal-content .form-group {
    margin-bottom: 20px;
    padding:10px;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-content input,
.modal-content textarea {
    width: calc(100%); /* Ensure padding doesn't overflow */
    margin: 0; /* Reset margin to prevent inconsistencies */
    padding: 10px; /* Add consistent padding */
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #2c2c2c;
    color: #fff;
    box-sizing: border-box; /* Ensure padding is included in the width */
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #4caf50; /* Highlight on focus */
}

.modal-content .form-actions {
    text-align: center;
}

.modal-content .form-actions .create {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-content .form-actions .create:hover {
    background-color: #45a049;
}

.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ccc;
}

#totals {
    text-align: center; /* Center the content */
    margin-top: 20px; /* Add some space above */
    padding: 10px; /* Add padding for spacing */
    background-color: #1e1e1e; /* Match table background */
    border: 1px solid #444; /* Add border to match table */
    border-radius: 8px; /* Rounded corners */
    color: #fff; /* Text color */
    font-size: 18px; /* Slightly larger font */
    width: 100%; /* Stretch to fit the table width */
    max-width: 600px; /* Optional: Limit max width for neat layout */
    margin-left: auto; /* Center align the totals container */
    margin-right: auto; /* Center align the totals container */
}

.form-container {
    background-color: #1e1e1e;
    padding: 30px; /* Consistent padding around the form */
    border-radius: 10px;
    width: 40%; /* Set the form's width */
    max-width: 500px; /* Restrict maximum width for larger screens */
    margin: 50px auto; /* Center the form horizontally and add vertical margin */
    color: #fff;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    position: relative; /* Ensure form content stays aligned */
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-container .form-group {
    margin-bottom: 20px;
    padding: 10px;
}

.form-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #fff;
}

.form-container input,
.form-container textarea {
    width: calc(100% - 20px); /* Adjust for consistent padding */
    margin: 0; /* Reset margin to prevent inconsistencies */
    padding: 10px; /* Add consistent padding */
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #2c2c2c;
    color: #fff;
    box-sizing: border-box; /* Ensure padding is included in the width */
}

.form-container input:focus,
.form-container textarea:focus {
    outline: none;
    border-color: #4caf50; /* Highlight on focus */
}

.form-container .form-actions {
    text-align: center;
    margin-top: 20px;
}

.form-container .form-actions .btn-primary {
    background-color: #F1C40F;
    color: black;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-container .form-actions .btn-primary:hover {
    background-color: #D4A30A;
}

/* Style for the radio button group */
.form-group label {
    display: inline-flex;
    align-items: center;
    font-weight: bold;
    color: #fff;
    margin-right: 20px; /* Space between radio buttons */
    cursor: pointer;
    font-size: 16px;
}

.form-group label input[type="radio"] {
    appearance: none; /* Remove default radio button style */
    width: 16px;
    height: 16px;
    margin-right: 8px; /* Space between radio button and label text */
    border: 2px solid #F1C40F; /* Yellow border */
    border-radius: 50%; /* Make it circular */
    outline: none;
    cursor: pointer;
    background-color: #1e1e1e; /* Match modal background color */
    transition: background-color 0.3s, border-color 0.3s;
}

.form-group label input[type="radio"]:checked {
    background-color: #F1C40F; /* Yellow background for checked state */
    border-color: #D4A30A; /* Slightly darker border for checked state */
}

.form-group label input[type="radio"]:hover {
    border-color: #F39C12; /* Highlight border on hover */
}

/* Center the version options below the title */
.version-options {
    text-align: center;
    margin-bottom: 20px; /* Add some spacing below the radio inputs */
}

.version-options label {
    display: inline-flex;
    align-items: center;
    margin-right: 30px; /* Space between options */
    font-weight: bold;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.version-options input[type="radio"] {
    appearance: none; /* Remove default radio button style */
    width: 18px;
    height: 18px;
    margin-right: 8px; /* Space between radio button and label */
    border: 2px solid #F1C40F; /* Yellow border */
    border-radius: 50%; /* Circular shape */
    background-color: #1e1e1e; /* Match modal background */
    transition: background-color 0.3s, border-color 0.3s;
    cursor: pointer;
}

.version-options input[type="radio"]:checked {
    background-color: #F1C40F; /* Yellow when checked */
    border-color: #D4A30A; /* Darker border for checked state */
}

/* Centered label for "Versiones" */
.centered-label {
    text-align: center;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

/* Center the table */
.versiones-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#versionesTable {
    border-collapse: collapse;
    width: 100%;
    max-width: 500px; /* Optional: restrict the width */
    background-color: #1e1e1e;
    color: #ffffff;
    text-align: center;
}

#versionesTable th,
#versionesTable td {
    border: 1px solid #444;
    padding: 10px;
}

#versionesTable th {
    font-weight: bold;
}

/* Center the "N¨²mero de versiones" input */
.version-count-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Add spacing between label and input */
    margin-top: 10px;
}

.version-count-container label {
    font-weight: bold;
    color: #ffffff;
}

.version-count-container input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #2c2c2c;
    color: #ffffff;
    width: 60px; /* Adjust width as needed */
    text-align: center;
}
