/* Estilos para a Página de Projetos Salvos com Tema Escuro */

.keypad-saved-projects-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.keypad-projects-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden; /* Garante que o gradiente respeite as bordas arredondadas */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    background: linear-gradient(to bottom, #2d3748, #1a202c);
    color: #edf2f7; /* Cor de texto clara para bom contraste */
}

body:not(.woocommerce-cart) .main-content table tr:nth-child(2n+1) {
    background-color: #1a202c !important;
}

.keypad-projects-table th,
.keypad-projects-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #2d3748; /* Linha divisória sutil */
}

/* Cabeçalho da tabela */
.keypad-projects-table thead tr {
    background-color: rgba(0,0,0,0.25);
}

.keypad-projects-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    color: #a0aec0;
    letter-spacing: 0.8px;
}

/* Efeito hover nas linhas da tabela */
.keypad-projects-table tbody tr:hover {
    background-color: rgba(74, 85, 104, 0.2); /* #4a5568 com transparência */
}

/* Ações em Massa */
.bulk-actions-container {
    display: flex;
    gap: 10px;
}

.bulk-actions-container button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#bulk-download-pdf-admin {
    background-color: #3182ce;
    color: white;
}

#bulk-delete-admin {
    background: none;
    color: #c53030;
}

button.button-action.button-send-email {
    background: #543423;
    cursor: pointer;
}

.button-action.button-download-pdf {
    background: #eb5f10;
    color: white;
    border-radius: 10px;
    padding: 6px 20px;
}

button.button-action.button-view-pdf {
    background: steelblue;
    cursor: pointer;
}

button.button-action.button-delete-project {
    background: darkslategray;
    cursor: pointer;
}

button.button-action {
    color: white;
    background: transparent;
    border: 0px;
    padding: 7px 20px;
}

/* --- Estilos para o Popup de Visualização de PDF --- */

.pdf-viewer-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; /* Começa escondido */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.pdf-viewer-modal-overlay.is-visible {
    display: flex; /* Torna-se visível quando esta classe é adicionada */
}

.pdf-viewer-modal-content {
    background-color: #1a202c; /* Cor de fundo escura */
    width: 90%;
    height: 90vh; /* Ocupa 90% da altura da tela */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 70px;
}

.pdf-viewer-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    background-color: #fff;
    color: #1a202c;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 35px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
}

.pdf-viewer-iframe {
    width: 100%;
    height: 100%;
    border-radius: 0 0 8px 8px; /* Arredonda os cantos inferiores */
}

/* Estilos Finais para o Modal (Popup) */

.kpb-modal-overlay {
    /* "position: fixed" liberta o elemento para a janela do navegador */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Um z-index alto para garantir que ele fica por cima de tudo */
    z-index: 99999; 
}

.kpb-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    max-width: 90%;
    max-height: 90vh; /* Ocupa no máximo 90% da altura da tela */
    overflow-y: auto; /* Adiciona scroll se o conteúdo for grande */
}

.kpb-modal-content img {
    max-width: 100%;
    height: auto;
}

.kpb-modal-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #555;
    cursor: pointer;
}

#header-outer{
    z-index: 0 !important
}

/* Adicione estes estilos ao seu saved-projects.css */

.email-form-field {
    margin-bottom: 15px;
}
.email-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #cbd5e0;
}
.email-form-field input[type="email"],
.email-form-field input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #4a5568;
    background-color: #2d3748;
    color: #edf2f7;
    border-radius: 4px;
}
#email-sender-confirm {
    margin-top: 10px;
    width: 100%;
    padding: 12px;
}

@media (max-width: 999px) {
    .button-edit-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 450px;
    }
}

.email-form-field input {
    color: black !important;
}

.keypad-admin-panel-container input {
    color: black !important;
}

.user-card {
    background: #164156;
    border-radius: 20px;
    padding: 20px;
    margin: 10px;
}

.user-actions button {
    background: #cd5513;
    color: white;
    padding: 5px 15px;
    border: 0px;
    text-transform: uppercase;
    margin-top: 10px;
    font-weight: 600;
}

/* Estilos para a linha de detalhes do pedido */
.order-details-row td {
    background-color: #f9f9f9;
    padding: 20px !important;
}

.order-details-list {
    margin: 0;
    padding-left: 20px;
}

.order-details-row .order-notes-display {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 10px;
    margin-top: 15px;
    white-space: pre-wrap; /* Preserva as quebras de linha */
    color: #333;
}

.order-details-row h4 {
    margin-top: 20px;
    margin-bottom: 5px;
    font-size: 14px;
}

button.button.button-link-delete.button-delete-order {
    color: white;
    background-color: #d63638;
    border: 0px;
}

button#delete-all-logs {
    margin: -3px;
    margin-left: 15px;
}