﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* --- ALAP BEÁLLÍTÁSOK --- */
html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-color: #f4f7f9;
}

html {
    font-size: 110%;
    scroll-behavior: smooth;
}

@media (min-width: 992px) {
    html {
        font-size: 120%;
    }
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
    padding-bottom: 80px !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* --- VALIDÁCIÓ --- */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* --- KÁRTYÁK ÉS LISTA ELEMEK --- */
.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.card-hover-effect {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none !important;
}

    .card-hover-effect:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    }
/* Piros kör alakú kuka gomb a kártyák sarkában */
.card-floating-action {
    position: absolute;
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #f8d7da;
    border-radius: 50%;
    z-index: 10;
    color: #dc3545;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Kifejezetten a törlés gomb (ha nincs rajta külön class, adjunk neki: .delete-btn) */
.delete-btn {
    top: 10px;
    right: 10px;
    color: #dc3545;
    border: 1px solid #f8d7da;
}

    .delete-btn:hover {
        background-color: #dc3545;
        color: white;
        transform: scale(1.1);
    }

.view-btn {
    bottom: 3.2rem; /* Kicsit lejjebb hozzuk, hogy jobban illeszkedjen a kör alakú kép aljához */
    right: 15px; /* Kicsit beljebb toljuk a kártya szélétől */
    color: #0d6efd;
    border-color: #cfe2ff;
    z-index: 11; /* Biztosítjuk, hogy a szöveg vagy egyéb elem mögé se tudjon becsúszni */
}

.card-floating-action:hover {
    background-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

.view-btn:hover {
    background-color: #0d6efd;
    color: white;
    transform: scale(1.1);
}

.card-badge-top {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    font-size: 0.75rem;
}

.card-action-footer {
    background: #f1f5f9;
    border: none;
    border-top: 1px solid #dee2e6;
    width: 100%;
    color: #0d6efd;
    padding: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* --- MODAL FIX: MINDEN FELETT (Javított blokk) --- */
.modal-backdrop.show {
    z-index: 9998 !important;
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.modal.show {
    z-index: 9999 !important;
    display: flex !important; /* Középre igazításhoz */
    display: block !important;
}

.modal-content {
    border: none;
    border-radius: 1.5rem !important;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175);
    background-color: white !important;
}

@media (max-width: 767.98px) {
    .modal-dialog {
        width: calc(100% - 20px) !important;
        max-width: none !important;
        margin: 10px auto !important;
        /* Magasság korlátozása, hogy ne lógjon ki sehol */
        max-height: calc(100vh - 20px);
        display: flex;
        align-items: center;
    }

    .modal-content {
        max-height: 100%;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem !important;
    }
}

/* --- ADAT MEGJELENÍTŐK (INFO BOX) --- */
.info-box-sm {
    padding: 6px 12px;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0.5rem;
}

    .info-box-sm label {
        font-size: 0.65rem;
        text-transform: uppercase;
        color: #6c757d;
        font-weight: 850;
        margin-bottom: 0;
    }

    .info-box-sm .value {
        color: #212529;
        font-weight: 500;
        font-size: 0.95rem;
    }

/* --- FORM ÉS INPUTOK --- */
.custom-floating > .form-control {
    height: 3.5rem;
    padding-top: 1.2rem;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.custom-floating > label {
    padding-top: 0.8rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.profile-img-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin: 0 auto;
}

    .profile-img-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* --- GOMBOK ÉS KONTÉNEREK --- */
.btn-pill {
    border-radius: 50rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

/* --- SZEREPKÖR VÁLASZTÓ KÁRTYÁK --- */
.role-selection-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

    /* Főbérlő specifikus színek */
    .role-selection-card.landlord .icon-wrapper {
        background: rgba(27, 110, 194, 0.1);
        color: #1b6ec2;
    }

    .role-selection-card.landlord:hover {
        border-color: #1b6ec2 !important;
    }

    /* Bérlő specifikus színek */
    .role-selection-card.tenant .icon-wrapper {
        background: rgba(40, 167, 69, 0.1);
        color: #28a745;
    }

    .role-selection-card.tenant:hover {
        border-color: #28a745 !important;
    }

/* Ikon wrapper finomítás */
.icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

@media (max-width: 767.98px) {
    .btn-pill {
        flex: 1;
        font-size: 0.85rem;
    }
}

@media (min-width: 768px) {
    .btn-pill {
        min-width: 180px;
        flex: 0 1 auto;
    }
}

/* --- ANIMÁCIÓK ÉS EGYEBEK --- */
.animate__shakeX {
    animation: shakeX 0.5s;
}

@keyframes shakeX {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-10px);
    }

    40%, 80% {
        transform: translateX(10px);
    }
}

.form-control.invalid, .form-control.is-invalid {
    border: 1px solid #dc3545 !important;
    box-shadow: inset 0 0 0 1px #dc3545 !important;
}

.card.edit-mode-active {
    overflow: visible !important;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    position: fixed;
    width: 100%;
    z-index: 10000; /* Legyen ez is a modal felett */
    display: none;
}

/* Üres állapot jelző (dashed box) */
.empty-card-base {
    border: 2px dashed #dee2e6;
    background-color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #6c757d;
}

    .empty-card-base:hover {
        border-color: #0d6efd;
        background-color: #f8f9fa;
        color: #0d6efd;
    }
