/* Clicable cards */
.card-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 10px;
}

    .card-link .picture {
        flex-shrink: 0;
    }

    .card-link:hover {
        cursor: pointer;
        background-color: #f5f5f5;
    }

/* Tabelas com loader */

.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.table-container {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-rows: repeat(10, minmax(3rem, auto));
}

.table-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.table-body {
    display: table-row-group;
    height: 100%;
    position: relative;
}

.loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    height: 100%;
    box-sizing: border-box;
}

.loader-row td {
    text-align: center;
    vertical-align: middle;
    padding: 0;
}

.table-empty {
    text-align: center;
    vertical-align: middle;
    padding: 1.5rem;
    color: #666;
    font-style: italic;
}

/* Popups */
.popup-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.popup-mask.show {
    opacity: 1;
    pointer-events: auto;
}

.popupContainer {
    position: fixed;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 90vh;
    width: 600px;
    overflow-y: auto;
    background-color: #fff;
    z-index: 9999;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Mensagens de validação */
.validation-message {
    color: red;
    font-weight: bold;
    font-size: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/*Documentos*/
.dropContainer {
    position: relative;
    padding: 15px;
    min-height: 60px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

    .dropContainer:hover {
        background-color: #e0f0ff;
        cursor: pointer;
    }

.dropContainerContent {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

    .dropContainerContent .gra-link,
    .dropContainerContent i {
        color: #333;
        transition: color 0.3s ease;
    }

.dropContainer:hover .gra-link,
.dropContainer:hover i {
    color: #0056b3;
}

/* Mensagens de sucesso ou falha */
.toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
}

.toast-success, .toast-error {
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 90vw;
    word-wrap: break-word;
}

.toast-success {
    background-color: #4CAF50;
}

.toast-error {
    background-color: #f44336;
}



/* Ecrã de login */
.IniciarSessao {
    min-height: 100vh;
    background: url('/img/background-login.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sectionLogin {
    max-width: 640px;
    width: 100%;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 40px #1f5faf1a;
    background-color: #fff;
}

.logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.logo-row .gra-logo-gov-blue {
    max-height: 60px;
    width: auto;
}

.logo-row .vertical-bar {
    width: 2px;
    background-color: #252f5d;
    height: 60px;
    margin: 0 0.5rem;
}

.logo-row h1 {
    margin: 0 0 0 0.5rem;
    font-size: 2rem;
    color: #252f5d;
    display: flex;
    align-items: center;
}

.sectionLogin form .mb-3:last-child {
    margin-bottom: 0;
}

.header-logo-row {
    display: flex;
    justify-content: left;
    align-items: flex-start;
    padding: 0.25rem 0;
}

    .header-logo-row img.gra-logo-gov-blue {
        max-height: 75px !important;
        width: auto;
    }

.header-logo-row .vertical-bar {
    margin: 0 0 0 1rem;
    width: 2px;
    background-color: #252f5d;
    height: 35px;
}

.header-logo-row h1 {
    margin: 0 0 0 1rem;
    font-size: 2rem;
    color: #252f5d;
    display: flex;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .header-logo-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .header-logo-row .vertical-bar {
        width: 100%;
        height: 2px;
        margin: 0;
    }

    .header-logo-row img.gra-logo-gov-blue {
        max-height: 25px !important;
    }

    .header-logo-row h1 {
        font-size: 0.9rem;
        margin-left: 0;
    }
}

/*Tabelas estatisticas*/
.gra-table-custom th:not(:first-child):not(:last-child),
.gra-table-custom td:not(:first-child):not(:last-child) {
    padding: 0.1rem 0.1rem !important;
    text-align: center;
}
.gra-table-custom th:last-child,
.gra-table-custom td:last-child {
    text-align: center !important;
}

/*Botões desactivados*/
button:disabled {
    opacity: 0.6;
}

button:disabled i {
    opacity: 0.8;
}

/*Tabelas botoes hover*/
table .icon-circle-success,
table .icon-close,
table .icon-print,
table .icon-duplicate,
table .icon-eye,
table .icon-edit,
table .icon-file-pdf,
table .icon-trash {
    display: inline-block;
    transition: transform 0.2s ease, color 0.2s ease;
    transform-origin: center;
    cursor: pointer;
}

table .icon-circle-success:hover,
table .icon-close:hover,
table .icon-print:hover,
table .icon-duplicate:hover,
table .icon-eye:hover,
table .icon-edit:hover,
table .icon-file-pdf:hover,
table .icon-trash:hover {
    transform: scale(1.2);
    color: var(--gra-color-hover, #007bff);
}

.add-upload-btn {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.add-upload-btn:hover {
    transform: scale(1.1);
    color: var(--gra-color-hover, #007bff);
}

.add-upload-btn i {
    display: inline-block;
}

/*Hide Texto Licencas*/
.print-only {
    display: none !important;
}

@media print {
    .print-only {
        display: block !important;
    }
}

/*Read only fields styled like disabled*/
.readonly-select,
.readonly-input {
    background-color: #e9ecef;
    color: #6c757d;
    pointer-events: none;
    cursor: not-allowed;
}

/* Always reserve vertical scrollbar space, but make it subtle */
html {
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 2px solid transparent;
}

/*Menu mobile*/
.menu_mobile {
    position: absolute;        /* Position relative to header */
    top: 60px;                 /* Adjust based on header height */
    right: 0;
    background-color: white;   /* Or your desired color */
    width: 200px;              /* Adjust as needed */
    border: 1px solid #ccc;    /* Optional */
    z-index: 999;              /* Make sure it’s on top */
    display: none;             /* Hidden by default */
}

.menu_mobile ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu_mobile li {
    border-bottom: 1px solid #eee;
}

.menu_mobile li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
}

.menu_mobile li a:hover {
    background-color: #f0f0f0;
}

