/* =============================================
   TheInforix Survey Plugin — style.css
   theinforix.com
   ============================================= */

/* ── Main Box ── */
.tix-survey-box {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    max-width: 620px;
    margin: 24px auto;
    box-shadow: 0 4px 28px rgba(0,0,0,0.10);
    border: 1px solid #f0f0f0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ── Header ── */
.tix-sv-header {
    background: linear-gradient(135deg, #0D0D0F 0%, #1a1a22 100%);
    padding: 22px 26px 18px;
    border-bottom: 3px solid #e85d24;
}

.tix-sv-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #e85d24;
    background: rgba(232,93,36,0.12);
    border: 1px solid rgba(232,93,36,0.3);
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.tix-sv-title {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    margin: 0 0 6px !important;
    line-height: 1.3 !important;
    padding: 0 !important;
    border: none !important;
}

.tix-sv-desc {
    color: #999 !important;
    font-size: 13px !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* ── Body ── */
.tix-sv-body {
    padding: 22px 26px;
}

/* ── Options ── */
.tix-sv-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.tix-sv-option {
    display: block;
    cursor: pointer;
    user-select: none;
}

.tix-sv-option input[type="radio"] {
    display: none;
}

.tix-sv-option-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 2px solid #eee;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: #fafafa;
}

.tix-sv-option:hover .tix-sv-option-inner {
    border-color: #e85d24;
    background: #fff8f4;
    transform: translateX(3px);
}

.tix-sv-option.tix-sv-selected .tix-sv-option-inner {
    border-color: #e85d24;
    background: #fff4ee;
    box-shadow: 0 2px 12px rgba(232,93,36,0.12);
}

/* ── Radio dot ── */
.tix-sv-radio-dot {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}

.tix-sv-option.tix-sv-selected .tix-sv-radio-dot {
    border-color: #e85d24;
    background: #e85d24;
    box-shadow: inset 0 0 0 3px #fff;
}

.tix-sv-option-text {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

/* ── Submit Button ── */
.tix-sv-submit-btn {
    width: 100%;
    padding: 13px;
    background: #e85d24;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tix-sv-submit-btn:hover:not(:disabled) {
    background: #d04d18;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232,93,36,0.35);
}

.tix-sv-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── Spinner inside button ── */
.tix-sv-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tixSpin 0.7s linear infinite;
}

@keyframes tixSpin { to { transform: rotate(360deg); } }

/* ── Privacy note ── */
.tix-sv-privacy {
    text-align: center;
    font-size: 11px;
    color: #bbb;
    margin: 8px 0 0;
}

/* ── Results ── */
.tix-sv-voted-msg {
    background: #d4edda;
    color: #155724;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.tix-sv-result-row {
    margin-bottom: 18px;
}

.tix-sv-result-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.tix-sv-percent {
    font-size: 16px;
    font-weight: 800;
    color: #e85d24;
}

.tix-sv-bar-bg {
    background: #f0f0f0;
    border-radius: 8px;
    height: 14px;
    overflow: hidden;
    margin-bottom: 4px;
}

.tix-sv-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
    min-width: 2px;
}

.tix-sv-vote-count {
    font-size: 11px;
    color: #999;
    text-align: right;
}

/* ── Footer ── */
.tix-sv-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 26px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.tix-sv-total {
    font-size: 13px;
    color: #555;
}

.tix-sv-total strong {
    color: #e85d24;
}

.tix-sv-brand {
    font-size: 11px;
    font-weight: 800;
    color: #e85d24;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* ── Error ── */
.tix-sv-error {
    background: #fff3cd;
    border: 1px solid #f2a623;
    border-radius: 8px;
    padding: 14px 18px;
    color: #555;
    font-size: 14px;
}

/* ── Mobile ── */
@media (max-width: 500px) {
    .tix-sv-header { padding: 18px; }
    .tix-sv-body   { padding: 16px; }
    .tix-sv-title  { font-size: 17px !important; }
    .tix-sv-option-inner { padding: 11px 12px; }
}
