@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
    --bg-color: #3a3a3a;
    --section-color: #4a4a4a;
    --subsection-color: #5a5a5a;
    --selection-bg-color: #758592;
    --text-color: #ffffff;
    --main-color: #2b8cd9;
    --secondary-color: #1e6fb0;
    --danger-color: #ff4444;
    --danger-hover: #cc0000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
    color: var(--text-color);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-color);
}

header {
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    background-color: var(--main-color);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 6fr 1fr;
    align-items: center;
    padding: 25px;
}

img {
    width: 100%;
    height: 100%;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    background-color: var(--section-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}


#calcular{
    font-size: 30px;
    font-weight: 700;
}

select,
button {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    transition: all 0.3s ease;
}

select {
    background-color: var(--selection-bg-color);
    color: var(--text-color);
    cursor: pointer;
}

button.main {
    background-color: var(--main-color);
    cursor: pointer;
    font-weight: 500;
}

button.main:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

ul.list-group {
    margin-top: 10px;
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    padding: 15px;
    background-color: var(--subsection-color);
    border-radius: 5px;
    margin-top: 20px;
}

input.form-control {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    border: none;
    background-color: var(--selection-bg-color);
    color: var(--text-color);
}

.mb-2 {
    margin-bottom: 10px;
}

.relatorio-card {
    background-color: var(--subsection-color);
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.relatorio-card h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--main-color);
}

.relatorio-card p, .relatorio-card li {
    font-size: 18px;
    margin: 8px 0;
    list-style-type: none;
}

.relatorio-card .label {
    font-weight: bold;
    color: var(--text-color);
}

footer {
    padding: 20px;
    text-align: center;
    background-color: var(--section-color);
    width: 100%;
    margin-top: auto;
}

footer p {
    font-size: 16px;
}

.fios-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
    margin-top: 15px;
    overflow-x: auto;
}

.fios-header {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    min-width: 800px;
}

.fio-coluna {
    text-align: center;
    padding: 12px;
    background-color: var(--subsection-color);
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fio-coluna h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.fio-coluna h4 {
    margin: 5px 0 0 0;
    font-size: 14px;
    font-weight: normal;
    color: #cccccc;
}

.fios-linha {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

.fios-linha select,
.fios-linha input {
    margin-bottom: 0;
}

.opcoes-container {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-bottom: 15px;
    align-items: stretch;
}

.opcoes-fio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(123px, 1fr));
    gap: 10px;
    flex-grow: 1;
    align-items: stretch;
}

.fio {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fio-label {
    width: 100%;
    height: 100%;
    min-height: 70px;
    padding: 10px;
    background-color: #3b3b3b;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.fio-radio {
    display: none;
}

.fio-radio:checked+.fio-label {
    background-color: var(--main-color);
    border-color: #93c5fd;
}

.fio-radio:hover+.fio-label {
    transform: translateY(-2px);
}

.fio-label small {
    font-size: 0.75rem;
    font-weight: normal;
    color: #d1d5db;
}

.fio-remover {
    display: flex;
    align-items: stretch;
    min-width: 80px;
}

.remover-linha {
    width: 100%;
    /*min-height: 70px;*/
    padding: 10px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    align-self: stretch;
}

.remover-linha:hover {
    background-color: var(--danger-hover);
    transform: translateY(-2px);
}

.remover-linha svg {
    width: 24px;
    height: 24px;
}

.fio-tamanho,
.fio-quantidade {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: none;
    background-color: var(--selection-bg-color);
    color: var(--text-color);
    font-size: 1.2rem;  /* Tamanho similar ao h2 */
    font-weight: 600;   /* Peso similar ao título */
    padding: 12px 15px; /* Aumente o padding para melhor aparência */
    height: auto;
}

.fio-tamanho {
    cursor: pointer;
}

input:focus, select:focus {
    border: 1px solid var(--main-color);
    outline: none;
  }

.fio-opcao input[type="radio"]:checked~.fio-tamanho,
.fio-opcao input[type="radio"]:checked~.fio-quantidade {
    background-color: var(--selection-bg-color);
    opacity: 1;
}

.fio-opcao input[type="radio"]:not(:checked)~.fio-tamanho,
.fio-opcao input[type="radio"]:not(:checked)~.fio-quantidade {
    opacity: 0.5;
    cursor: not-allowed;
}

#adicionarLinha {
    font-size: 23px;
    font-weight: 700;
    margin-bottom: 15px;
    background-color: var(--subsection-color);
    color: var(--text-color);
    border: 1px solid var(--main-color);
}

#adicionarLinha:hover {
    background-color: var(--main-color);
}

#linhas-adicionais {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fios-selecionados ul {
    list-style-type: none;
    padding-left: 0;
}

.fios-selecionados li {
    padding: 5px 0;
}

/* Responsividade */
@media (max-width: 1200px) {
    main {
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .fios-header,
    .fios-linha {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 10px;
    }
    
    header img {
        margin-right: 0;
        margin-bottom: 10px;
        height: 40px;
    }
    
    header h1 {
        font-size: 1.2rem;
        padding: 0;
    }

    .opcoes-container {
        flex-direction: column;
    }

    .fio-remover {
        width: 100%;
    }
}

@media (max-width: 576px) {
    select,
    button {
        padding: 10px;
        font-size: 14px;
    }

    .relatorio-card {
        padding: 15px;
    }

    .relatorio-card h2 {
        font-size: 20px;
    }

    .relatorio-card p, .relatorio-card li {
        font-size: 16px;
    }

    .opcoes-fio {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

.relatorio-btn {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.relatorio-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.relatorio-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.inputs-container {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.inputs-container .fio-tamanho {
    flex: 1; /* Ocupa todo o espaço disponível */
    min-width: 0; /* Permite que o elemento encolha */
}

.inputs-container .fio-quantidade {
    width: 80px; /* Largura fixa para o input de quantidade */
    flex-shrink: 0; /* Impede que o elemento encolha */
}

.help-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #0056b3;
    color: white;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.help-button:hover {
    background-color: #003d7a;
}

.modal {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 20px;
}

.modal h3 {
    margin-top: 0;
    margin-right: 30px; /* Espaço para o botão de fechar */
    color: #0056b3;
}

.modal ul {
    list-style-type: none;
    padding: 0;
}

.modal li {
    margin-bottom: 10px;
}

.modal a {
    color: #0056b3;
    text-decoration: none;
}

.modal a:hover {
    text-decoration: underline;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #ff0000;
    padding: 0;
    margin: 0;
    width: auto;
    height: auto; 
    min-width: 0; 
    min-height: 0;
    line-height: 1;      
    display: inline;     
}