/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem; /* 16px */
}

/* Modal stílusok */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    position: relative;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #9ca3af; /* gray-400 */
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}
.modal-close-btn:hover {
    color: white;
}

.modal-title {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: white;
}

.modal-input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #4b5563; /* gray-600 */
    border-radius: 0.5rem;
    color: white;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-input::placeholder {
    color: #9ca3af; /* gray-400 */
}
.modal-input:focus {
    outline: none;
    border-color: #6366f1; /* indigo-500 */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
}
.modal-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #d1d5db; /* gray-300 */
}

.modal-submit-btn {
    width: 100%;
    padding: 0.75rem;
    background-image: linear-gradient(to right, #4f46e5, #7c3aed);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}
.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-switch-text {
    text-align: center;
    margin-top: 1.5rem;
    color: #d1d5db; /* gray-300 */
}
.modal-switch-text a {
    color: #818cf8; /* indigo-400 */
    font-weight: 600;
    text-decoration: none;
}
.modal-switch-text a:hover {
    text-decoration: underline;
}

.error-msg {
    color: #f87171; /* red-400 */
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    display: none; /* Alapból rejtett */
}

/* Előredefiniált eszközök rácsa */
.predefined-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.predefined-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    border: 1px solid transparent;
}
.predefined-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}
.predefined-item.selected {
    border-color: #6366f1; /* indigo-500 */
    background-color: rgba(99, 102, 241, 0.3);
}
.predefined-item svg {
    width: 2.5rem; /* 40px */
    height: 2.5rem; /* 40px */
    margin-bottom: 0.5rem;
    color: #c7d2fe; /* indigo-200 */
}
.predefined-item span {
    font-size: 0.75rem; /* 12px */
    text-align: center;
    color: #e5e7eb; /* gray-200 */
}

/* Eszköz lista kártya */
.appliance-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.appliance-card .details-main {
    display: flex;
    align-items: center;
    width: 100%;
}
.appliance-card .details-main .icon-container {
    flex-shrink: 0;
}
.appliance-card .details-main .info {
    flex-grow: 1;
    margin-left: 1rem;
    margin-right: 1rem;
}
.appliance-card .actions button {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s, transform 0.2s;
    z-index: 10;
    position: relative;
}
.appliance-card .actions button:hover {
    color: #f87171; /* red-400 */
    transform: scale(1.1);
}

.details-extended {
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-top 0.4s ease-out;
    margin-top: 0;
    padding-left: 0; 
}
.appliance-card.expanded .details-extended {
    max-height: 20rem;
    opacity: 1;
    margin-top: 0.75rem;
}
.details-extended .details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    text-align: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
@media (min-width: 768px) {
    .details-extended .details-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.details-extended .details-grid:first-child {
    border-top: none;
    padding-top: 0;
}
.details-extended h5 {
    grid-column: 1 / -1;
    font-weight: bold;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    text-align: left;
}
.details-extended .text-green-400 { color: #4ade80; }
.details-extended .text-pink-400 { color: #f472b6; }


/* Költségkalkulátor stílusok */
.cost-section {
    margin-top: 1rem;
}
.cost-section:first-child {
    margin-top: 0;
}
.cost-section-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.cost-breakdown {
    padding: 0.75rem;
    background-color: rgba(0,0,0,0.2);
    border-radius: 0.5rem;
}
.cost-total {
    font-size: 1.125rem; /* text-lg */
    font-weight: bold;
    margin-top: 0.5rem;
}


/* Kijelentkezett nézet specifikus stílusok */
#logged-out-view .custom-focus:focus-within {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
    border-color: rgba(99, 102, 241, 0.7);
}
#logged-out-view .custom-focus input:focus, #logged-out-view .custom-focus select:focus {
    outline: none;
}
#logged-out-view .result-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#logged-out-view .radio-label input:checked + .radio-custom {
    background-color: #4f46e5;
    border-color: #4f46e5;
}
#logged-out-view .radio-label input:checked + .radio-custom .dot {
    transform: scale(1);
}
#logged-out-view .details-panel {
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, margin-top 0.5s ease-in-out, padding-top 0.5s ease-in-out;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    overflow: hidden;
}
#logged-out-view .group:hover .details-panel, #logged-out-view .details-visible .details-panel {
    max-height: 5rem;
    opacity: 1;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}
