:root {
--primary-color: #2c3e50;
--secondary-color: #A67E4C;
--background: #f5f6fa;
--tab-active: #BFDBFE;
--tab-inactive: #e1ecf3;
--inactive-btn: #bdc3c7;
}
.calculator-container {
max-width: 800px;
margin: 40px auto;
border-radius: 3px;
overflow: hidden;
}
.tabs {
display: flex;
background: var(--tab-inactive);
}
.tab {
flex: 1;
padding: 12px;
text-align: center;
cursor: pointer;
background: var(--tab-inactive); transition: all 0.3s;
}
.tab.active {
background: var(--tab-active);
border-bottom: 2px solid var(--secondary-color);
color: var(--primary-color);
font-weight: bold;
}
.tab:hover:not(.active) {
background: var(--tab-active);
}
.input-group {
margin: 10px 0;
display: flex; gap: 5px;
}
.input-row {
display: flex;
align-items: center;
gap: 10px;
}
.input-wrapper {
position: relative;
margin: 5px 0;
flex: 0 0 auto;
}
.input-suffix,
.input-connector,
.input-equals {
font-size: 16px;
color: #333;
line-height: 1;
}
.input-suffix {
margin-left: 5px;
}
.input-connector,
.input-equals {
margin: 0 10px;
}
.suffix-group {
display: flex;
gap: 5px;
align-items: center;
}
.rate-buttons {
margin-top: 10px;
display: flex;
gap: 5px;
flex-wrap: wrap;
}
.rate-btn {
padding: 5px 10px;
border: none;
border-radius: 3px;
background: var(--inactive-btn);
color: #fff;
cursor: pointer;
transition: background 0.3s;
font-size: 14px;
}
.rate-btn.active {
background: var(--secondary-color);
}
.rate-btn:hover:not(.active) {
background: #95a5a6;
}
.btn {
padding: 12px 20px;
border: none;
border-radius: 3px;
cursor: pointer;
font-size: 16px;
background: var(--secondary-color);
color: white;
transition: background 0.3s;
}
.btn:hover {
background: #2980b9;
}
.results {
background: #e1d9cf;
padding: 20px;
border-radius: 3px;
margin: 20px 0;
}
.result-item {
margin: 15px 0;
padding: 10px;
border-left: 4px solid var(--secondary-color);
}
.result-item span {
color: var(--primary-color);
font-weight: bold;
font-size: 18px;
}
label {
display: block;
margin-bottom: 5px;
color: var(--primary-color);
}
.history {
margin: 20px 0;
}
.history-table {
width: 100%;
border-collapse: collapse;
margin-top: 15px;
}
.history-table th,
.history-table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #eee;
}
.history-table th {
background: var(--primary-color);
color: white;
}
.delete-btn {
width: 20px;
height: 20px;
border-radius: 50%;
background: #e74c3c;
color: white;
border: none;
cursor: pointer;
font-size: 12px;
line-height: 20px;
text-align: center;
}
.delete-btn:hover {
background: #c0392b;
}
.button-group {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
margin: 20px 10px;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
opacity: 1;
}
.pipe-diagram {
width: 200px;
height: 150px;
object-fit: contain;
} input [type=number], select {
padding: 20px 5px 5px 10px;
width: 200px;
margin-right: 10px;
border: 1px solid blue;
border-radius: 3px;
font-size: 16px;
}
input:focus [type=number] {
outline: none; border: 2px solid blue; }
.input-label {
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
color: #999;
transition: all 0.2s ease;
pointer-events: none;
font-size: 16px;
}
input:not(:placeholder-shown) + .input-label {
display: none; }
.result-container {
display: flex;
justify-content: center;
align-items: center;
margin: 20px 0;
padding: 10px;
}
.result {
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
font-size: 1.2em;
}
.weight-row {
display: flex;
align-items: center;
gap: 10px;
}
.weight-label {
font-weight: normal;
color: #333;
}
.weight-box {
border: 1px solid #767676;
border-radius: 3px;
padding: 2px 8px;
background: #fff;
}
.otvet {
font-size: 1.5em;
font-weight: bold;
background: linear-gradient(350deg, #09005e, #377bff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.unit {
font-weight: normal;
color: #333;
}
.copy-btn {
background: transparent;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.2s;
}
.copy-btn svg {
width: 18px;
height: 18px;
fill: #333;
}
.copy-btn:hover {
opacity: 0.7;
}
.weight-digit {
display: inline-block;
min-width: 1ch;
text-align: center;
}
.cost-calc {
margin-top: 30px;
padding: 20px;
background: #e1ecf3;
border-radius: 3px;
}
.result-value {
background: linear-gradient(350deg, #09005e, #377bff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: bold;
}
#pipe-desc {
text-align: center;
margin-bottom: 10px;
color: #333;
font-size: 1.1em;
}
select {
padding: 10px;
width: 100%;
border: 1px solid #767676;
border-radius: 3px;
font-size: 16px;
background: #fff;
cursor: pointer;
}
select:focus {
outline: none;
border-color: var(--secondary-color);
} .content {
display: none;
padding: 10px 10px; border-radius: 0 0 5px 5px;
width: 100%;
box-sizing: border-box;
overflow: hidden;
background: #e1ecf3;
}
.content.active {
display: block;
}
.content-row {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap; }
.diagram-container {
display: flex;
justify-content: center;
margin-top: 10px;
height: 150px;
flex: 0 0 auto;
}
@media (max-width: 600px) {
.input-group {
grid-template-columns: 1fr;
}
.btn {
width: 100%;
}
.button-group {
gap: 10px;
}
.save-button-container {
padding: 10px;
}
.history-table th,
.history-table td {
font-size: 12px;
padding: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.input-row {
flex-direction: row;
flex-wrap: wrap;
align-items: center;
gap: 5px;
}
.input-wrapper {
flex: 0 0 auto;
display: flex;
align-items: center;
}
.suffix-group {
flex: 0 0 auto;
margin-left: 5px;
display: flex;
align-items: center;
}
.input-connector:not(.suffix-group .input-connector) {
display: none;
}
.input-equals {
flex: 0 0 auto;
margin-left: 5px;
}
.input-wrapper input {
width: 150px;
}
.diagram-container {
height: 100px; }
.pipe-diagram {
width: 140px; height: 100px;
}
} :root {
--primary-color: #2c3e50;
--secondary-color: #007bff;
--background: #f5f6fa;
--tab-active: #BFDBFE;
--tab-inactive: #e1ecf3;
--inactive-btn: #bdc3c7;
}
.percent-calculator {
max-width: 800px;
margin: 0 auto;
padding: -20px;
font-family: Arial, sans-serif;
}
.percent-calculator h2 {
text-align: center;
margin-bottom: 10px;
}
.percent-calculator p {
text-align: center;
margin-bottom: 20px;
}
.calculator-block {
border: 1px solid #ddd;
border-radius: 8px;
margin-bottom: 15px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.block-header {
background: #f0f7ff;
padding: 10px 15px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
border-radius: 8px 8px 0 0;
}
.block-header h3 {
margin: 0;
font-size: 16px;
color: #333;
}
.block-header .toggle-arrow {
width: 16px;
height: 16px;
transition: transform 0.3s ease;
}
.block-header .toggle-arrow.up {
transform: rotate(180deg);
}
.block-content {
padding: 15px;
display: none;
background: #f0f7ff;
}
.block-content.active {
display: block;
}
.input-group {
flex: 1;
display: flex;
align-items: center;
gap: 5px;
}
.input-group input {
width: 120px;
padding: 8px 30px 8px 8px; border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
-webkit-appearance: none;
-moz-appearance: textfield;
appearance: none; } .input-group input::-webkit-inner-spin-button,
.input-group input::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
} .input-group .input-wrapper {
position: relative;
display: inline-block;
}
.input-group .spinner-buttons {
position: absolute;
right: 2px;
top: 50%;
transform: translateY(-50%);
display: flex;
flex-direction: column;
gap: 2px;
}
.input-group .spinner-button {
width: 20px;
height: 14px;
background: #e1ecf3;
border: 1px solid #ddd;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
cursor: pointer;
user-select: none;
}
.input-group .spinner-button:hover {
background: #d1dce3;
}
.input-group .spinner-button:active {
background: #c1ccd3;
}
.input-group span {
font-size: 14px;
}
.copy-icon {
cursor: pointer;
flex-shrink: 0;
}
.copy-icon:hover {
opacity: 0.7;
}
.formula {
font-size: 12px;
color: #666;
text-align: center;
margin-top: 10px;
}
.result-value {
background: linear-gradient(350deg, #09005e, #377bff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: bold;
}
.result-text {
color: #000; }
.input-row {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: nowrap;
margin-bottom: 10px;
}
.result-row {
display: flex;
align-items: center;
gap: 10px;
justify-content: center;
padding: 10px 0;
}
@media (max-width: 600px) {
.input-group input {
width: 100px;
}
.input-group span {
font-size: 12px;
}
.input-group .spinner-button {
width: 18px;
height: 12px;
font-size: 10px;
}
}