/* ==========================================================================
   Analyzer Tool — Neil Patel Inspired
   ========================================================================== */

/* Steps visibility */
.az-step { display: none; }
.az-step--active { display: block; }

/* ==========================================================================
   Step 1: Hero / URL Input
   ========================================================================== */
.az-hero {
    background: var(--color-primary);
    min-height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.az-hero__container {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 24px;
    text-align: center;
}
.az-hero__title {
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}
.az-hero__subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 40px;
}
.az-hero__form {
    display: flex;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.az-hero__input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 16px;
    font-family: var(--font-family);
    outline: none;
}
.az-hero__input::placeholder { color: #9ca3af; }
.az-hero__btn {
    padding: 16px 32px;
    background: var(--color-dark);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-family);
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.az-hero__btn:hover { opacity: 0.9; }

/* ==========================================================================
   Step 2: Loading Animation
   ========================================================================== */
.az-loading {
    background: var(--color-primary);
    min-height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.az-loading__container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
    text-align: center;
}
.az-loading__title {
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}
.az-loading__message {
    color: rgba(255,255,255,0.9);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 40px;
    min-height: 54px;
    transition: opacity 0.4s ease;
}
.az-loading__bar {
    width: 100%;
    max-width: 600px;
    height: 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 6px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}
.az-loading__progress {
    height: 100%;
    width: 0%;
    background: repeating-linear-gradient(
        -45deg,
        rgba(255,255,255,0.9),
        rgba(255,255,255,0.9) 10px,
        rgba(255,255,255,0.6) 10px,
        rgba(255,255,255,0.6) 20px
    );
    background-size: 28px 28px;
    border-radius: 6px;
    transition: width 0.5s ease;
    animation: az-stripe 0.8s linear infinite;
}
@keyframes az-stripe {
    0% { background-position: 0 0; }
    100% { background-position: 28px 0; }
}

/* ==========================================================================
   Step 3: Lead Capture Form
   ========================================================================== */
.az-lead {
    background: var(--color-primary);
    min-height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}
.az-lead__container {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}
.az-lead__title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}
.az-lead__subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 300;
    margin-bottom: 28px;
}
.az-lead__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.az-lead__row {
    display: flex;
    gap: 12px;
}
.az-lead__input,
.az-lead__select {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-family: var(--font-family);
    background: #fff;
    color: var(--color-text);
    outline: none;
}
.az-lead__input::placeholder { color: #9ca3af; }
.az-lead__select { color: #9ca3af; cursor: pointer; }
.az-lead__select.az-lead__select--filled { color: var(--color-text); }
.az-lead__select option { color: var(--color-text); }
.az-lead__select option:disabled { color: #9ca3af; }
.az-lead__select--full { width: 100%; }
.az-lead__phone-row {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}
.az-lead__phone-flag {
    padding: 0 10px 0 14px;
    font-size: 14px;
    color: var(--color-text);
    white-space: nowrap;
    flex-shrink: 0;
}
.az-lead__input--phone {
    border-radius: 0;
    padding-left: 0;
}
.az-lead__disclaimer {
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    line-height: 1.5;
    margin-top: 4px;
}
.az-lead__btn {
    margin-top: 8px;
    padding: 16px;
    background: #F59E0B;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-family);
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}
.az-lead__btn:hover { opacity: 0.9; }

/* ==========================================================================
   Step 4: Results
   ========================================================================== */
.az-results {
    background: #fff;
    min-height: calc(100vh - 130px);
    padding: 40px 0 80px;
}
.az-results__container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}
.az-results__title {
    font-size: 32px;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 24px;
}
.az-results__title span {
    font-weight: 400;
}
.az-results__tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 24px;
}
.az-results__tab {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: var(--font-family);
    color: var(--color-text-light);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.az-results__tab--active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.az-results__panel { display: none; }
.az-results__panel--active { display: block; }

/* Suggestion item */
.az-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
    gap: 24px;
}
.az-item__content {
    flex: 1;
}
.az-item__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    position: relative;
    top: 2px;
}
.az-item__dot--alto { background: #EF4444; }
.az-item__dot--medio { background: #F59E0B; }
.az-item__dot--baixo { background: #22C55E; }

.az-item__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}
.az-item__desc {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
}
.az-item__desc a {
    color: var(--color-primary);
    text-decoration: underline;
}
.az-item__badge {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}
.az-item__badge--alto {
    background: #FEE2E2;
    color: #DC2626;
}
.az-item__badge--medio {
    background: #FEF3C7;
    color: #D97706;
}
.az-item__badge--baixo {
    background: #D1FAE5;
    color: #059669;
}
.az-item__time {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* Score header */
.az-score {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    margin-bottom: 24px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}
.az-score__number {
    font-size: 56px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    flex-shrink: 0;
}
.az-score__number span {
    font-size: 20px;
    font-weight: 400;
    color: var(--color-text-light);
}
.az-score__details {
    flex: 1;
}
.az-score__details p {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}
.az-score__details strong {
    color: var(--color-text);
}

/* Keywords */
.az-keywords {
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 8px;
}
.az-keywords__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}
.az-keywords__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.az-keywords__tag {
    padding: 6px 14px;
    background: #EFF6FF;
    color: #1D4ED8;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.az-keywords__tag em {
    font-style: normal;
    opacity: 0.6;
    font-size: 11px;
}

/* Raw info grid */
.az-raw-info {
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 8px;
}
.az-raw-info__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}
.az-raw-info__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
}
.az-raw-info__item {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
}
.az-raw-info__item span {
    margin-right: 6px;
    font-weight: 700;
}
.az-raw-info__ok {
    background: #F0FDF4;
    color: #166534;
}
.az-raw-info__fail {
    background: #FEF2F2;
    color: #991B1B;
}

/* Error state */
.az-error {
    background: var(--color-primary);
    min-height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
}
.az-error h2 { color: #fff; font-size: 32px; margin-bottom: 16px; }
.az-error p { color: rgba(255,255,255,0.9); font-size: 18px; margin-bottom: 32px; }
.az-error button {
    padding: 14px 32px;
    background: var(--color-dark);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-family);
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 768px) {
    .az-hero__title { font-size: 28px; }
    .az-hero__form { flex-direction: column; border-radius: 0; }
    .az-hero__input { border-radius: 6px; }
    .az-hero__btn { border-radius: 6px; }
    .az-loading__title { font-size: 24px; }
    .az-loading__message { font-size: 15px; }
    .az-lead__row { flex-direction: column; }
    .az-lead__title { font-size: 18px; }
    .az-results__title { font-size: 22px; }
    .az-item { flex-direction: column; gap: 12px; }
    .az-item__badge { align-self: flex-start; }
}
