/* ── Rank in AI Scanner Styles ── */

/* Hero / Input Section */
.rai-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
}

.rai-input-group {
    max-width: 550px;
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.rai-input-group .form-control {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 1rem;
    padding: 0 18px;
    border-radius: 30px;
    height: 48px;
}

.rai-input-group .form-control::placeholder {
    color: rgba(255,255,255,0.5);
}

.rai-input-group .form-control:focus {
    border-color: #cee002;
    box-shadow: 0 0 0 0.2rem rgba(206,224,2,0.25);
    background: rgba(255,255,255,0.15);
}

.rai-input-group .btn {
    white-space: nowrap;
    padding: 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 48px;
    border-radius: 30px;
}

/* Progress Section */
.rai-progress {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
}

.rai-steps {
    text-align: left;
}

.rai-step {
    color: #ccc;
    font-size: 1.05rem;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rai-step-icon {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.rai-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
}

.rai-icon-pending {
    color: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.15);
    line-height: 18px;
    font-size: 0.7rem;
}

.rai-icon-active {
    color: #cee002;
    border: 2px solid #cee002;
    line-height: 18px;
    animation: rai-pulse 1.2s ease-in-out infinite;
}

.rai-icon-done {
    color: #181a1f;
    background: #cee002;
    border: 2px solid #cee002;
    line-height: 18px;
}

@keyframes rai-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
}

.rai-step-detail {
    margin-left: auto;
    font-size: 0.85rem;
    color: #999;
}

.rai-progress-bar {
    height: 24px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
}

.rai-progress-bar .progress-bar {
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 24px;
    transition: width 0.4s ease;
}

.bg-yellow,
.btn-yellow {
    background-color: #cee002 !important;
    color: #181a1f !important;
    border-color: #cee002 !important;
}

.btn-yellow:hover {
    background-color: #b8c802 !important;
    border-color: #b8c802 !important;
}

/* Results Sections */
.rai-section {
    padding: 60px 0;
}

.rai-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 30px;
    color: #fff;
}

.rai-card .row > div {
    padding: 6px 15px;
    font-size: 0.95rem;
}

/* Big Question */
.rai-bigq {
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.rai-bigq h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.rai-bigq p {
    font-size: 1.1rem;
    margin: 0;
}

.rai-bigq-yes {
    background: #1a3d1a;
    border: 2px solid #28a745;
    color: #d4edda;
}

.rai-bigq-no {
    background: #3d1a1a;
    border: 2px solid #dc3545;
    color: #f8d7da;
}

/* Competition Bars */
.rai-comp-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.rai-comp-client {
    background: rgba(40,167,69,0.15);
}

.rai-comp-name {
    min-width: 180px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.rai-comp-bar-wrap {
    flex: 1;
    height: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin: 0 15px;
    overflow: hidden;
}

.rai-comp-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.rai-bar-client {
    background: #28a745;
}

.rai-bar-above {
    background: #dc3545;
}

.rai-bar-below {
    background: #6c757d;
}

.rai-comp-count {
    color: #aaa;
    font-size: 0.85rem;
    min-width: 30px;
    text-align: right;
}

/* Engine Cards */
.rai-engine-card {
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    min-height: 200px;
    color: #181a1f;
}

.rai-engine-card h5 {
    font-weight: 700;
    margin-bottom: 10px;
}

.rai-engine-pct {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.rai-engine-detail {
    font-size: 0.85rem;
    color: #555;
}

.rai-engine-sentiment {
    font-size: 1.8rem;
    margin: 8px 0;
}

.rai-engine-rank {
    font-size: 0.8rem;
    color: #555;
}

.rai-engine-notfound {
    font-size: 0.85rem;
    color: #dc3545;
    font-weight: 600;
}

/* Rankings Table */
.rai-table {
    color: #fff;
}

.rai-table thead th {
    border-color: rgba(255,255,255,0.15);
    color: #aaa;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rai-table td {
    border-color: rgba(255,255,255,0.08);
    vertical-align: middle;
    font-size: 0.9rem;
}

.rai-row-client {
    background: rgba(40,167,69,0.15) !important;
}

.rai-vis-bar-wrap {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.rai-vis-bar {
    height: 100%;
    border-radius: 6px;
}

.rai-vis-client {
    background: #28a745;
}

.rai-vis-comp {
    background: #dc3545;
}

/* Query Cards */
.rai-query-card {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    color: #fff;
}

.rai-query-text {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
}

.rai-query-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.rai-badge-yes {
    background: rgba(40,167,69,0.2);
    color: #a3e4b5;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
}

.rai-badge-no {
    background: rgba(220,53,69,0.2);
    color: #f5a5ad;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
}

.rai-query-snippets {
    margin-bottom: 10px;
}

.rai-snippet {
    font-size: 0.85rem;
    color: #bbb;
    padding: 2px 0;
}

.rai-query-ranking {
    font-size: 0.9rem;
    margin-top: 6px;
}

.rai-rank-client {
    color: #28a745;
    font-weight: 700;
}

.rai-rank-comp {
    color: #dc3545;
}

/* Raw response blocks */
.rai-raw-responses {
    margin-top: 10px;
}

.rai-raw-block {
    background: #1a1a1a;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 10px;
}

.rai-raw-block strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #ccc;
}

.rai-raw-block pre {
    color: #ddd;
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.rai-raw-toggle {
    font-size: 0.8rem;
    color: #aaa;
    border-color: rgba(255,255,255,0.2);
}

.rai-raw-toggle:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

/* Sentiment Breakdown */
.rai-sentiment-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}

.rai-sent-pos { background: #28a745; }
.rai-sent-neu { background: #6c757d; }
.rai-sent-neg { background: #dc3545; }

.rai-sentiment-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
    font-size: 0.75rem;
}

.rai-sentiment-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #aaa;
}

.rai-sent-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Responsive */
@media (max-width: 767px) {
    .rai-comp-name {
        min-width: 100px;
        font-size: 0.8rem;
    }

    .rai-bigq h2 {
        font-size: 1.3rem;
    }

    .rai-engine-pct {
        font-size: 2rem;
    }

    .rai-input-group {
        flex-direction: column;
    }
}
