/* CSS für Hauptrechner und Nachberechner 
 * Version: 3.0.0
 * */

.calculator-container {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	border-radius: 24px;
	padding: 40px;
	max-width: 900px;
	width: 100%;
	box-shadow:
		0 20px 40px rgba(0, 0, 0, 0.1),
		0 8px 25px rgba(0, 0, 0, 0.05),
		inset 0 1px 0 rgba(255, 255, 255, 0.6);
	border: 3px solid #0a1a49;
	transition: all 0.3s ease;
}

.calculator-container:hover {
	transform: translateY(-2px);
	box-shadow:
		0 25px 50px rgba(0, 0, 0, 0.15),
		0 10px 30px rgba(0, 0, 0, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.header {
	text-align: center;
	margin-bottom: 48px;
}

.header h1 {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 12px;
	letter-spacing: -0.02em;
}

.form-section {
	margin-bottom: 40px;
}

.section-title {
	font-family: 'Montserrat',sans-serif;
	font-size: 1.3rem;
	font-weight: 700;
	color: #0a1a49;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	text-transform: uppercase;
}

.section-title-content {
	display: flex;
	align-items: center;
	gap: 10px;
}

.accordion-arrow {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #6B7280;
	transition: transform 0.3s ease;
	font-size: 18px;
}

.accordion-arrow.rotated {
	transform: rotate(180deg);
}

.additional-options-section {
	cursor: pointer;
}

.additional-options-section .section-title:hover .accordion-arrow {
	color: #0a1a49;
}

.section-icon {
	width: 35px;
	height: 35px;
	background: linear-gradient(135deg, #E8ECF5, #F8FAFF);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.year-selector {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.year-radio {
	display: none; /* Verstecke die echten Radio-Inputs */
}

.year-option {
	background: #F9FAFB;
	border: 2px solid #E5E7EB;
	border-radius: 12px;
	padding: 12px 24px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-weight: 500;
	color: #374151;
	font-size: 1.1em;
	flex: 1;
	text-align: center;
	min-width: 100px;
	height: 100%;
	display: block; /* Labels als Block-Elemente */
}

.year-option:hover {
	border-color: #0a1a49;
	background: rgba(10, 26, 73, 0.05);
	transform: translateY(-1px);
}

.year-radio:checked + .year-option {
	background: linear-gradient(135deg,#0e2567 10%, #081536 100%);
	border-color: #0a1a49;
	color: white;
	box-shadow: 0 4px 12px rgba(10, 26, 73, 0.3);
	border: 2px solid transparent;
}

.materials-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
}

/* Neue Material-Card Styles für Input-Integration */
.material-input-container {
	position: relative;
	background: #FAFBFC;
	border: 2px solid #E1E5E9;
	border-radius: 16px;
	transition: all 0.3s ease;
	overflow: hidden;
	cursor: text;
	min-height: 80px;
	display: flex;
	align-items: center;
	padding: 0 20px;
	gap: 15px;
}

.material-input-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, transparent 0%, #f59f08 50%, transparent 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.material-input-container:hover {
	border-color: #0a1a49;
	box-shadow: 0 8px 25px rgba(10, 26, 73, 0.15);
	transform: translateY(-2px);
}

.material-input-container:hover::before {
	opacity: 1;
}

.material-input-container.focused {
	border-color: #0a1a49;
	box-shadow: 0 0 0 3px rgba(10, 26, 73, 0.1);
	background: white;
}

.material-input-container.has-value {
	border-color: #0a1a49;
	background: rgba(10, 26, 73, 0.05);
}

.material-input-container.error {
	border-color: #dc2626;
	background: rgba(220, 38, 38, 0.02);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.material-input-container.error .material-label {
	color: #dc2626;
}

.material-input-container.error .material-unit {
	color: #dc2626;
}

.material-input-container.error .material-icon {
	background: linear-gradient(135deg, #dc2626, #991b1b);
}

.material-icon {
	width: 50px;
	height: 50px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	color: white;
	flex-shrink: 0;
	/*background: linear-gradient(135deg, #E8ECF5, #F59F08);*/
}

.material-input-content {
	flex: 1;
	display: flex;
	align-items: center;
	position: relative;
	min-height: 45px;
}

.material-input {
	width: 100%;
	border: none;
	border-style: hidden!important;
	background: transparent!important;
	font-weight: 600;
	color: #0A1A49!important;
	font-size: 1.3em!important;
	outline: none;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0;
	z-index: 2;
}

.material-input::-webkit-outer-spin-button,
.material-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.material-input[type=number] {
	-moz-appearance: textfield;
}

.material-label {
	font-weight: 600;
	color: #6B7280;
	font-size: 1.1rem;
	position: absolute;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
	pointer-events: none;
	transition: all 0.3s ease;
	z-index: 1;
}

.material-input-container.focused .material-label,
.material-input-container.has-value .material-label {
	font-size: 0.8rem;
	top: 0;
	color: #0a1a49;
	font-weight: 500;
}

.material-unit {
	color: #6B7280;
	font-weight: 600;
	font-size: 1rem;
	flex-shrink: 0;
	margin-left: 10px;
}

.material-input-container.focused .material-unit,
.material-input-container.has-value .material-unit {
	color: #0a1a49;
}

.additional-options {
	background: #F8FAFC;
	border-radius: 16px;
	padding: 32px;
	border: 1px solid #E2E8F0;
	overflow: hidden;
	transition: all 0.3s ease;
}

.additional-options.collapsed {
	max-height: 0;
	padding: 0 32px;
	opacity: 0;
	visibility: hidden;
}

.additional-options.expanded {
	max-height: 1000px;
	opacity: 1;
	visibility: visible;
}

.options-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
}

.option-card {
	background: white;
	border: 2px solid #E5E7EB;
	border-radius: 12px;
	padding: 20px;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	height: 100%;
}

.option-card:hover {
	border-color: #0a1a49;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(10, 26, 73, 0.1);
}

.option-card.active {
	border-color: #0a1a49;
	background: rgba(10, 26, 73, 0.05);
}

.option-checkbox {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 20px;
	height: 20px;
	border: 2px solid #D1D5DB;
	border-radius: 4px;
	background: white;
	transition: all 0.2s ease;
}

.option-card.active .option-checkbox {
	background: #0a1a49;
	border-color: #0a1a49;
}

.option-card.active .option-checkbox::after {
	content: '✓';
	color: white;
	font-size: 12px;
	font-weight: bold;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.option-title {
	font-weight: 600;
	color: #1F2937;
	margin-bottom: 8px;
	padding-right: 32px;
}

.option-description {
	color: #6B7280;
	font-size: 0.9rem;
	line-height: 1.5;
}

.calculate-button {
	width: 100%;
	background: linear-gradient(135deg, #f8ac27 0%, #f59f08 100%);
	border: none;
	padding: 20px 32px;
	border-radius: 16px;
	font-size: 1.2rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-top: 40px;
	position: relative;
	overflow: hidden;
}

.calculate-button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	transition: left 0.5s ease;
}

.calculate-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(10, 26, 73, 0.4);
	color: #0e2567;
}

.calculate-button:hover::before {
	left: 100%;
}

.calculate-button:active {
	transform: translateY(0);
}

/* Anpassungen für Wechselrechner */

.wechselrechner h2 {
    font-size: 1.5em!important;
}

.wechselrechner .section-title-content {
    font-size: .9em!important;
}

.wechselrechner.calculator-container {
    padding: 20px;
}

.wechselrechner .materials-grid {
	grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.wechselrechner .material-input-container {
    min-height: 60px;
    border-radius: 13px;
    padding: 0 16px;
}

.wechselrechner .material-icon {
	width: 40px;
	height: 40px;
	font-size: 14px;
}

.wechselrechner .material-label {
	font-weight: 600;
	font-size: 0.8rem;
	transform: translateY(-40%);
	pointer-events: none;
}

.wechselrechner .material-input {
	font-size: 1em!important;
}

.wechselrechner .calculate-button {
    margin-top: 0px;
}

.wechselrechner select{
	appearance: none;
	-webkit-appearance: none;
	outline: none;
	width: inherit;
	cursor: pointer;
	background-color: #fff;
}

@media (max-width: 768px) {
	.calculator-container {
		padding: 24px;
	}

	.header h1 {
		font-size: 2rem;
	}

	.materials-grid {
		grid-template-columns: 1fr;
	}

	.material-input-container {
		min-height: 70px;
		padding: 0 15px;
	}

	.material-icon {
		width: 45px;
		height: 45px;
		font-size: 16px;
	}

	/*.year-selector {
		flex-direction: column;
	}*/
	
	.year-option {
		min-width: auto;
	}

	.options-grid {
		grid-template-columns: 1fr;
	}
}

.fade-in {
	animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Compact Calculator */

.compact-calculator {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Filter Bar Container */
.filter-bar {
    background: white;
    border: 3px solid #0a1a49;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Jahr-Sektion (horizontale Anordnung) */
.year-section {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E5E7EB;
    flex-wrap: wrap;
}
@media (min-width: 768px) {
    .year-section {
        flex-wrap: nowrap;
    }
}

.year-label {
    font-weight: 700;
    color: #0a1a49;
    font-size: 0.95rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 110px;
}

/* Jahr-Dropdown Styles */
.year-selector-dropdown {
    display: flex;
    flex: 0 0 auto;
}

.year-select {
    background: rgb(249, 250, 251);;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 40px 12px 20px;
    font-size: 1.1em;
    font-weight: 700;
    color: #0a1a49;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230a1a49' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    min-width: 150px;
}

.year-select:hover {
    border-color: #0a1a49;
    background-color: rgba(10, 26, 73, 0.05);
}

.year-select:focus {
    outline: none;
    border-color: #0a1a49;
    box-shadow: 0 0 0 3px rgba(10, 26, 73, 0.1);
}

/* Material-Sektion (horizontale Anordnung) */
.materials-section {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E5E7EB;
}

.materials-label {
    font-weight: 700;
    color: #0a1a49;
    font-size: 0.95rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 110px;
}

/* Kompaktere Material-Inputs für horizontale Variante */
.compact-calculator .materials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    flex: 1;
}

.compact-calculator .material-input-container {
    min-height: 65px;
    padding: 0 15px;
    gap: 12px;
}

.compact-calculator .material-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.compact-calculator .material-input-content {
    min-height: 38px;
}

.compact-calculator .material-input {
    font-size: 1.1em!important;
}

.compact-calculator .material-label {
    font-size: 0.95rem;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-calculator .material-input-container.focused .material-label,
.compact-calculator .material-input-container.has-value .material-label {
    font-size: 0.7rem;
}

.compact-calculator .material-unit {
    font-size: 0.9rem;
    margin-left: 8px;
}

/* Optionen-Sektion - Kompakte Version */
.options-section {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.options-label {
    font-weight: 700;
    color: #0a1a49;
    font-size: 0.95rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 110px;
    padding-top: 12px;
}

.options-simple {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
}

.option-simple {
    position: relative;
    background: rgb(249, 250, 251);
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
	height: 100%!important;
}

.option-simple input[type="checkbox"] {
    display: none;
}

.option-simple:hover {
    border-color: #0a1a49;
    background: rgba(10, 26, 73, 0.05);
    transform: translateY(-1px);
}

.option-simple input[type="checkbox"]:checked + .option-text {
    color: #0a1a49;
    font-weight: 600;
}

.option-simple:has(input[type="checkbox"]:checked) {
    border-color: #0a1a49;
    background: rgba(10, 26, 73, 0.08);
}

.option-text {
    transition: all 0.2s ease;
}

.tooltip-icon {
    color: #9CA3AF;
    font-size: 0.9rem;
    cursor: help;
    transition: color 0.2s ease;
}

.option-simple:hover .tooltip-icon {
    color: #0a1a49;
}

.option-simple::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #1F2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: normal;
    max-width: 250px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
    line-height: 1.4;
}

.option-simple:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Button Anpassungen für Kompakte Version */
.compact-calculator .calculate-button {
    border-radius: 12px;
    padding: 16px 40px;
    font-size: 1.15rem;
    margin-top: 0px;
}

.compact-calculator .calculate-button-desktop {
    max-width: 450px;
}

.compact-calculator .calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 26, 73, 0.35);
}

/* Button Responsive Platzierung */
@media (max-width: 767px) {
    .calculate-button-mobile {
        width: 100%;
        margin-top: 20px;
        display: block;
    }
    .calculate-button-desktop {
        display: none;
    }
}

@media (min-width: 768px) {
    .calculate-button-desktop {
        margin-left: auto;
        display: block;
    }
    .calculate-button-mobile {
        display: none;
    }
}

/* Tablet-Ansicht */
@media (max-width: 1200px) {
    .compact-calculator .materials-grid,
    .materials-grid-compact {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Kleinere Tablets */
@media (max-width: 900px) {
    .compact-calculator .materials-grid,
    .materials-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Ansicht */
@media (max-width: 768px) {
    .filter-wrapper {
        gap: 15px;
    }

    .year-section,
    .materials-section,
    .options-section {
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 15px;
    }

    /* Materialien untereinander auf Mobile */
    .compact-calculator .materials-grid,
    .materials-grid-compact {
        grid-template-columns: 1fr;
    }

}