/*
Theme Name: ISS Busca Dark Theme
Theme URI: https://viaautomacao.io/
Author: Fernando Rodrigues
Description: Tema escuro e moderno para consulta de alíquotas de ISS.
Version: 1.0.0
Text Domain: iss-busca
*/

/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #05070a;
    color: #ffffff;
}

/* Remove margens padrão do WordPress */
body,
h1,
h2,
h3,
p {
    margin-top: 0;
}

/* =========================================
   APLICAÇÃO
========================================= */

#iss-app {
    position: relative;

    width: 100%;
    min-height: 100vh;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(0, 180, 255, 0.12),
            transparent 45%
        ),
        #05070a;
}

/* =========================================
   ÁREA PRINCIPAL
========================================= */

.iss-hero {
    position: relative;

    width: 100%;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 60px 20px;

    overflow: hidden;
}

/* =========================================
   CONTAINER
========================================= */

.iss-container {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 1000px;

    margin: 0 auto;
}

/* =========================================
   CABEÇALHO
========================================= */

.iss-header {
    width: 100%;

    margin: 0 auto 40px;

    text-align: center;
}

.iss-overline {
    display: inline-block;

    margin-bottom: 14px;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.25em;

    color: #22d3ee;
}

.iss-header h1 {
    margin: 0;

    font-size: clamp(32px, 5vw, 56px);

    line-height: 1.1;

    font-weight: 700;

    color: #ffffff;
}

.iss-header p {
    width: 100%;
    max-width: 650px;

    margin: 18px auto 0;

    font-size: 16px;

    line-height: 1.7;

    color: rgba(255, 255, 255, 0.65);
}

/* =========================================
   CARD DO FORMULÁRIO
========================================= */

.iss-card {
    width: 100%;

    padding: 28px;

    border: 1px solid rgba(255, 255, 255, 0.10);

    border-radius: 20px;

    background: rgba(10, 15, 20, 0.78);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.40);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* =========================================
   GRID
========================================= */

.iss-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;

    width: 100%;
}

/* =========================================
   CAMPOS
========================================= */

.iss-field {
    display: flex;

    flex-direction: column;

    gap: 8px;

    width: 100%;
}

.iss-field label {
    font-size: 14px;

    font-weight: 600;

    color: rgba(255, 255, 255, 0.9);
}

.iss-field input,
.iss-field select {
    width: 100%;
    height: 50px;

    padding: 0 15px;

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: 10px;

    outline: none;

    background: rgba(255, 255, 255, 0.05);

    color: #ffffff;

    font-family: inherit;

    font-size: 15px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.iss-field input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.iss-field select {
    cursor: pointer;
}

.iss-field select option {
    background: #10151b;
    color: #ffffff;
}

.iss-field input:hover,
.iss-field select:hover {
    border-color: rgba(255, 255, 255, 0.20);
}

.iss-field input:focus,
.iss-field select:focus {
    border-color: rgba(34, 211, 238, 0.70);

    background: rgba(255, 255, 255, 0.08);

    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.08);
}

/* =========================================
   COMBOBOX DE MUNICÍPIO
========================================= */

.iss-municipio-field {
    position: relative;
}

.iss-combobox {
    position: relative;
    width: 100%;
}

.iss-combobox-lista {
    position: absolute;

    top: calc(100% + 6px);
    left: 0;
    right: 0;

    z-index: 1000;

    display: none;

    max-height: 280px;

    overflow-y: auto;

    padding: 6px;

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: 12px;

    background: #10151b;

    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.45);
}

.iss-combobox-lista.ativo {
    display: block;
}

.iss-combobox-item {
    display: block;

    width: 100%;

    padding: 11px 12px;

    border: none;

    border-radius: 8px;

    background: transparent;

    color: #ffffff;

    text-align: left;

    font-family: inherit;

    font-size: 14px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.iss-combobox-item:hover {
    background: rgba(34, 211, 238, 0.10);

    color: #67e8f9;
}

.iss-combobox-vazio {
    padding: 12px;

    color: rgba(255, 255, 255, 0.55);

    font-size: 14px;

    text-align: center;
}


/* =========================================
   ERRO
========================================= */

.iss-error {
    display: none;

    margin-top: 18px;

    padding: 12px 15px;

    border: 1px solid rgba(239, 68, 68, 0.25);

    border-radius: 10px;

    background: rgba(239, 68, 68, 0.10);

    color: #fca5a5;

    font-size: 14px;

    line-height: 1.5;
}

/* =========================================
   BOTÃO
========================================= */

.iss-button-wrapper {
    display: flex;

    justify-content: center;

    width: 100%;

    margin-top: 26px;
}

#consultar-iss {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-width: 230px;
    height: 48px;

    padding: 0 24px;

    border: none;

    border-radius: 10px;

    cursor: pointer;

    background: #0891b2;

    color: #ffffff;

    font-family: inherit;

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 0.05em;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

#consultar-iss:hover {
    background: #06b6d4;

    transform: translateY(-1px);

    box-shadow:
        0 8px 25px rgba(6, 182, 212, 0.25);
}

#consultar-iss:active {
    transform: translateY(0);
}

#consultar-iss:focus-visible {
    outline: 2px solid #22d3ee;

    outline-offset: 3px;
}

/* =========================================
   RESULTADOS
========================================= */

.iss-resultados {
    width: 100%;

    margin-top: 25px;
}

/* =========================================
   RESPONSIVIDADE
========================================= */

@media (max-width: 700px) {

    .iss-hero {
        align-items: flex-start;

        padding: 40px 16px;
    }

    .iss-header {
        margin-bottom: 28px;
    }

    .iss-overline {
        font-size: 10px;

        letter-spacing: 0.18em;
    }

    .iss-header h1 {
        font-size: 34px;
    }

    .iss-header p {
        font-size: 14px;

        line-height: 1.6;
    }

    .iss-card {
        padding: 20px;

        border-radius: 16px;
    }

    .iss-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    #consultar-iss {
        width: 100%;
    }
}

/* =========================================
   TELAS MUITO PEQUENAS
========================================= */

@media (max-width: 400px) {

    .iss-hero {
        padding: 30px 12px;
    }

    .iss-card {
        padding: 16px;
    }

    .iss-header h1 {
        font-size: 30px;
    }
}

/* =========================================Adcionada aqui em diante
   CARD DE RESULTADO DA CONSULTA
========================================= */

.iss-resultados {
    width: 100%;
    margin-top: 32px;
}


/* =========================================
   CARD PRINCIPAL
========================================= */

.iss-result-card {
    position: relative;
    overflow: hidden;

    width: 100%;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;

    background: #10151b;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.25);

    color: #ffffff;
}


/* =========================================
   DECORAÇÃO NO CANTO SUPERIOR
========================================= */

.iss-result-decoration {
    position: absolute;

    top: 0;
    right: 0;

    width: 52px;
    height: 52px;

    background: rgba(34, 211, 238, 0.12);

    clip-path: polygon(
        100% 0,
        0 0,
        100% 100%
    );

    pointer-events: none;
}


/* =========================================
   CABEÇALHO DO RESULTADO
========================================= */

.iss-result-header {
    position: relative;

    padding: 28px 32px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


.iss-result-overline {
    display: block;

    margin-bottom: 8px;

    color: #67e8f9;

    font-family:
        "Courier New",
        monospace;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 0.25em;

    text-transform: uppercase;
}


.iss-result-aliquota {
    color: #ffffff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 56px;

    font-weight: 600;

    line-height: 1;

    letter-spacing: -0.04em;
}


/* =========================================
   GRID DOS DADOS
========================================= */

.iss-result-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 28px;

    padding: 28px 32px;
}


/* =========================================
   ITEM
========================================= */

.iss-result-item {
    display: flex;

    flex-direction: column;

    gap: 6px;

    min-width: 0;
}


.iss-result-full {
    grid-column: 1 / -1;
}


/* =========================================
   LABEL
========================================= */

.iss-result-label {
    display: block;

    color: rgba(255, 255, 255, 0.48);

    font-family:
        "Courier New",
        monospace;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 0.20em;

    line-height: 1.4;

    text-transform: uppercase;
}


/* =========================================
   VALORES
========================================= */

.iss-result-item strong {
    display: flex;

    align-items: flex-start;

    gap: 8px;

    color: rgba(255, 255, 255, 0.90);

    font-size: 14px;

    font-weight: 400;

    line-height: 1.6;
}


/* =========================================
   ÍCONES
========================================= */

.iss-result-icon {
    flex-shrink: 0;

    color: #67e8f9;

    font-size: 16px;

    line-height: 1.4;
}


/* =========================================
   CÓDIGO / DATAS
========================================= */

.iss-result-mono {
    font-family:
        "Courier New",
        monospace;

    letter-spacing: 0.08em;

    color: rgba(255, 255, 255, 0.90);
}


/* =========================================
   STATUS
========================================= */

.iss-status {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    width: fit-content;

    padding: 5px 10px;

    border-radius: 999px;

    font-family:
        "Courier New",
        monospace;

    font-size: 11px;

    font-weight: 600;

    letter-spacing: 0.06em;

    line-height: 1.4;
}


.iss-status-dot {
    width: 6px;
    height: 6px;

    flex-shrink: 0;

    border-radius: 50%;
}


/* =========================================
   STATUS — VIGENTE
========================================= */

.iss-status-vigente {
    border: 1px solid rgba(52, 211, 153, 0.30);

    background: rgba(52, 211, 153, 0.10);

    color: #6ee7b7;
}


.iss-status-vigente .iss-status-dot {
    background: #6ee7b7;
}


/* =========================================
   STATUS — ENCERRADA
========================================= */

.iss-status-encerrada {
    border: 1px solid rgba(251, 191, 36, 0.30);

    background: rgba(251, 191, 36, 0.10);

    color: #fcd34d;
}


.iss-status-encerrada .iss-status-dot {
    background: #fcd34d;
}


/* =========================================
   CARD DE ERRO
========================================= */

.iss-result-erro {
    border-color: rgba(248, 113, 113, 0.20);
}


.iss-result-mensagem {
    color: rgba(255, 255, 255, 0.85);

    font-size: 14px;

    line-height: 1.6;
}


/* =========================================
   RESPONSIVIDADE
========================================= */

@media (max-width: 700px) {

    .iss-result-header {
        padding: 24px 20px;
    }


    .iss-result-aliquota {
        font-size: 46px;
    }


    .iss-result-grid {
        grid-template-columns: 1fr;

        gap: 22px;

        padding: 24px 20px;
    }


    .iss-result-full {
        grid-column: auto;
    }

}


@media (max-width: 420px) {

    .iss-result-header {
        padding: 22px 16px;
    }


    .iss-result-grid {
        padding: 22px 16px;
    }


    .iss-result-aliquota {
        font-size: 42px;
    }

}

/* =========================================
   REFINAMENTO VISUAL DO RESULTADO
========================================= */

.iss-result-card {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.025) 0%,
            rgba(255, 255, 255, 0) 35%
        ),
        #10151b;

    border-color: rgba(255, 255, 255, 0.12);

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.30);
}


.iss-result-header {
    padding-top: 30px;
    padding-bottom: 30px;
}


.iss-result-overline {
    margin-bottom: 10px;

    color: #67e8f9;

    font-size: 10px;

    letter-spacing: 0.28em;
}


.iss-result-aliquota {
    font-size: clamp(52px, 6vw, 64px);

    font-weight: 600;

    letter-spacing: -0.055em;

    line-height: 0.95;
}


.iss-result-grid {
    gap: 30px;

    background:
        rgba(255, 255, 255, 0.008);
}


.iss-result-label {
    margin-bottom: 2px;

    color: rgba(255, 255, 255, 0.42);

    font-size: 9px;

    letter-spacing: 0.22em;
}


.iss-result-item strong {
    color: rgba(255, 255, 255, 0.92);

    font-size: 14px;
}


.iss-result-icon {
    color: #67e8f9;

    opacity: 0.9;
}


.iss-result-decoration {
    width: 58px;
    height: 58px;

    background: rgba(34, 211, 238, 0.14);
}

#consultar-iss:disabled {
    opacity: 0.55;

    cursor: wait;

    transform: none;

    box-shadow: none;
}


#consultar-iss span {
    font-size: 18px;

    line-height: 1;

    opacity: 0.9;
}

/* =========================================
   REFINAMENTO DOS CAMPOS DE CONSULTA
========================================= */

.iss-field input {
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.iss-field input:focus {
    outline: none;

    border-color: rgba(103, 232, 249, 0.55);

    background: rgba(255, 255, 255, 0.045);

    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.08);
}


/* Município */

#iss-municipio {
    padding-right: 42px;
}


/* Código do serviço */

#iss-codigo {
    font-family:
        "Courier New",
        monospace;

    letter-spacing: 0.06em;
}


/* Placeholder */

.iss-field input::placeholder {
    color: rgba(255, 255, 255, 0.30);

    opacity: 1;
}


/* =========================================
   ESTADO DE HOVER
========================================= */

.iss-field input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.20);

    background: rgba(255, 255, 255, 0.025);
}


/* =========================================
   COMBOBOX
========================================= */

.iss-combobox-lista {
    border-color: rgba(103, 232, 249, 0.16);

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0)
        ),
        #10151b;
}


.iss-combobox-item {
    transition:
        background 0.15s ease,
        color 0.15s ease,
        padding-left 0.15s ease;
}


.iss-combobox-item:hover {
    padding-left: 16px;
}

/* =========================================
   AJUSTES MOBILE
========================================= */

@media (max-width: 600px) {

    /* Container principal */

    .iss-container {
        width: 100%;

        padding-left: 16px;
        padding-right: 16px;
    }


    /* Cabeçalho */

    .iss-header {
        padding-left: 4px;
        padding-right: 4px;
    }


    .iss-header h1 {
        font-size: clamp(30px, 9vw, 40px);

        line-height: 1.08;

        letter-spacing: -0.035em;
    }


    .iss-header p {
        max-width: 100%;

        font-size: 14px;

        line-height: 1.65;
    }


    /* Card do formulário */

    .iss-card {
        width: 100%;

        padding: 20px 16px;
    }


    /* Campos */

    .iss-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .iss-field label {
        font-size: 10px;

        letter-spacing: 0.16em;
    }


    .iss-field input {
        min-height: 46px;

        font-size: 14px;
    }


    /* Botão */

    .iss-button-wrapper {
        width: 100%;

        margin-top: 18px;
    }


    #consultar-iss {
        width: 100%;

        min-height: 48px;
    }


    /* Lista de municípios */

    .iss-combobox-lista {
        max-height: 240px;
    }


    .iss-combobox-item {
        padding-top: 12px;
        padding-bottom: 12px;

        font-size: 14px;
    }


    /* Resultado */

    .iss-resultados {
        margin-top: 24px;
    }


    .iss-result-header {
        padding: 24px 18px;
    }


    .iss-result-aliquota {
        font-size: 46px;
    }


    .iss-result-grid {
        grid-template-columns: 1fr;

        gap: 20px;

        padding: 22px 18px;
    }


    .iss-result-full {
        grid-column: auto;
    }


    .iss-result-item strong {
        font-size: 14px;
    }

}


/* =========================================
   MOBILE MUITO PEQUENO
========================================= */

@media (max-width: 380px) {

    .iss-container {
        padding-left: 12px;
        padding-right: 12px;
    }


    .iss-card {
        padding: 18px 14px;
    }


    .iss-header h1 {
        font-size: 29px;
    }


    .iss-result-header {
        padding: 22px 16px;
    }


    .iss-result-grid {
        padding: 20px 16px;
    }


    .iss-result-aliquota {
        font-size: 42px;
    }


    #consultar-iss {
        padding-left: 16px;
        padding-right: 16px;

        font-size: 11px;
    }

}