/* 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;
}

body:not(.woocommerce-cart) .main-content table{
    background-color: #2b3343!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 {
    background-color: #3182ce;
    color: white;
}

#bulk-delete {
    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;
}

button#trigger-order-popup {
    background: #eb5f10;
    color: white;
}

/* ESTILIZACAO POPUP ENVIAR PEDIDO */
.order-summary-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #4a5568;
    border-radius: 4px;
}

.order-summary-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #2d3748;
}

.order-summary-list li:last-child {
    border-bottom: none;
}

.order-summary-list .project-name {
    font-weight: bold;
    color: #edf2f7;
}

.order-summary-list .quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-summary-list .quantity-control label {
    color: #a0aec0;
    font-size: 12px;
}

.order-summary-list .quantity-control input {
    width: 60px;
    text-align: center;
}

#order-notes {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    padding: 10px;
    border: 1px solid #4a5568;
    background-color: #2d3748;
    color: #edf2f7;
    border-radius: 4px;
}

.quantity-control input {
    color: black !important;
}

button#order-creation-confirm {
    background: #eb5f10;
    color: white;
    padding: 15px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    border: 0px;
}

button#trigger-my-orders-popup {
    background-color: forestgreen;
    color: white;
}

/* Meus pedidos */

.my-orders-table {
    width: 100%;
    border-collapse: collapse;
    color: #edf2f7;
}
.my-orders-table th, .my-orders-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #4a5568;
}
.my-orders-table th {
    background-color: rgba(0,0,0,0.2);
    font-size: 12px;
    text-transform: uppercase;
    color: #a0aec0;
}
.order-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: capitalize;
}
.status-aguardando_aprovacao { background-color: #dd6b20; color: white; }
.status-aprovado_em_producao { background-color: #3182ce; color: white; }
.status-pedido_concluido { background-color: #38a169; color: white; }
.status-cancelado { background-color: #c53030; color: white; }
.status-esta_a_caminho { background-color: #004d26; color: white; }

button.view-client-order-details {
    background-color: #111;
    color: white;
    border: 0px;
    padding: 5px 15px;
}

button.button-edit-notes {
    background: #095;
    color: white;
    border: 0px;
    padding: 10px;
}

button.button-request-cancellation {
    background: #111;
    color: white;
    border: 0px;
}

a.button-download-pdf {
    background: #dd6b20;
    color: white;
    border-radius: 10px;
    place-content: center;
    font-size: 13px;
    padding: 2px 15px;
}

/* Ordem detalhes */
.client-order-details-row td {
    padding: 20px;
    background-color: rgba(0,0,0,0.15);
}
.client-order-details-content h4 {
    margin-top: 0;
    color: #a0aec0;
    font-size: 12px;
    text-transform: uppercase;
}
.client-order-details-content p {
    color: #edf2f7;
}
.order-details-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}
.cancellation-pending-badge {
    display: inline-block;
    padding: 8px 12px;
    background-color: #4b31ff;
    color: white;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
}

span.cancellation-rejected-badge {
    display: inline-block;
    padding: 8px 12px;
    background-color: #ff3131;
    color: white;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
}

span.cancellation-accepted-badge {
    display: inline-block;
    padding: 8px 12px;
    background-color: #004402;
    color: white;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
}

.my-orders-scroll-wrapper {
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
    padding-right: 10px;
}

textarea.order-notes-edit {
    color: black !important;
}
textarea.cancellation-reason {
    color: black !important;
}

a.button.button-primary {
    color: white;
    background: #eb5f10;
    padding: 10px 20px;
    border-radius: 10px;
}