VoltageDrop / static /styles.css
Teapack1's picture
cg calculator added
0b9e56f
raw
history blame
6.36 kB
/* General Styles */
body {
font-family: Arial, sans-serif;
background-color: #f8f9fa;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
}
header {
display: flex;
align-items: center;
justify-content: center;
background-color: #343a40;
color: white;
width: 100%;
padding: 20px 0;
}
#logo {
height: 50px;
margin-right: 20px;
}
h1 {
margin: 0;
}
.content-wrapper {
display: flex;
width: 100%;
max-width: 1200px;
margin-top: 30px;
padding: 0 20px;
box-sizing: border-box;
}
.nav-section {
flex: 0 0 200px; /* Fixed width for the navigation */
margin-right: 20px;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 10px; /* Spacing between buttons */
}
.calculator-main {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
box-sizing: border-box;
}
#cable-container {
display: flex;
gap: 20px;
justify-content: center;
width: 100%;
margin-bottom: 20px;
flex-wrap: wrap; /* Allow wrapping for better responsiveness */
}
.cable-group {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
box-sizing: border-box;
position: relative;
flex: auto; /* Let the items grow and shrink based on space */
max-width: 800px; /* Optional maximum width */
min-width: 500px; /* Optional minimum width */
}
.cable-group h2 {
text-align: center;
margin-top: 0;
color: #343a40;
}
.form-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
width: 100%;
}
.form-row label {
flex: 0 0 40%; /* Label takes up 40% of the row */
font-weight: bold;
color: #343a40;
}
.form-row input,
.form-row select {
flex: 1; /* Input takes up the remaining space */
padding: 8px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 4px;
width: 100%;
box-sizing: border-box;
}
/* Dropdown styling */
.form-row select {
appearance: none;
background-color: #f8f9fa;
padding: 8px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 4px;
width: 100%;
box-sizing: border-box;
}
.btn-group, .form-group {
display: flex;
justify-content: space-between;
width: 100%; /* Ensure buttons are aligned in one row */
}
.btn {
padding: 8px 16px;
font-size: 14px;
cursor: pointer;
border: none;
color: white;
border-radius: 4px;
transition: background-color 0.3s ease;
}
.btn:hover {
opacity: 0.9;
}
.btn-add,
.btn-add-cable {
background-color: #007bff;
margin-right: 10px;
}
.btn-add-cable:disabled {
background-color: #6c757d;
cursor: not-allowed;
}
.btn-calculate {
background-color: #6c757d; /* Disabled state */
cursor: not-allowed;
}
.btn-calculate.enabled {
background-color: #28a745; /* Enabled state */
cursor: pointer;
}
.btn-cg-calculate {
background-color: #6c757d; /* Disabled state */
cursor: not-allowed;
}
.btn-cg-calculate.enabled {
background-color: #28a745; /* Enabled state */
cursor: pointer;
}
.btn-remove-cable {
background-color: #dc3545;
padding: 3px 8px;
font-size: 12px;
position: absolute;
bottom: 10px;
right: 10px;
}
.btn-nav {
background-color: #007bff;
color: white;
padding: 10px 16px;
font-size: 14px;
text-align: center;
border-radius: 4px;
transition: background-color 0.3s ease;
cursor: pointer;
border: none; /* Remove default button border */
display: block;
width: 100%; /* Full width within the nav section */
text-align: center;
width: 150px;
margin-top: 20px;
}
.btn-nav:hover {
background-color: #0056b3;
}
.action-buttons {
display: flex;
justify-content: center;
gap: 10px;
width: 100%;
margin-bottom: 20px;
}
.result-display {
margin-top: 20px;
font-size: 20px;
color: #28a745;
text-align: center;
padding: 20px;
border-top: 2px solid #dee2e6;
width: 50%;
background-color: white;
border-radius: 8px;
box-sizing: border-box;
}
.btn-back {
background-color: #007bff;
color: white;
padding: 8px 16px;
font-size: 14px;
text-align: center;
border-radius: 4px;
transition: background-color 0.3s ease;
cursor: pointer;
border: none;
display: block;
text-decoration: none;
text-align: center;
width: 150px;
margin-top: 20px;
}
.btn-back:hover {
background-color: #0056b3;
}
/* Media Queries for Responsiveness */
@media (max-width: 992px) {
#cable-container .cable-group {
flex: 1 1 48%; /* Two cables per row on medium screens */
}
#cable-container .cable-group:nth-child(3) {
flex: 1 1 100%; /* Stack the third cable below on medium screens */
}
}
@media (max-width: 768px) {
.content-wrapper {
flex-direction: column;
align-items: center;
}
.nav-section {
flex: 0 0 100%;
margin-bottom: 20px;
}
#cable-container .cable-group {
flex: 1 1 100%; /* Full width for all cables on small screens */
}
.btn-add-cable,
.btn-calculate {
width: 100%;
margin-right: 0;
}
.action-buttons {
flex-direction: column;
}
}
.btn-save {
background-color: #007bff;
}
.btn-delete {
background-color: #dc3545;
}
/* Adjusted Specific Styles for the Edit Cables Page */
.edit-cables-main {
display: flex;
flex-direction: column;
align-items: center;
margin: 30px auto;
width: 100%;
max-width: 500px; /* Adjusted width to make it more compact */
padding: 20px;
box-sizing: border-box;
background-color: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.add-cable-section, .existing-cables-section {
width: 100%;
margin-bottom: 30px;
}
.add-cable-section h2, .existing-cables-section h2 {
margin-bottom: 20px;
color: #343a40;
}