/*
 * CompartiCarga plugin — estilos namespaced con .cc- para no colisionar con
 * el tema del transportista. Mismas tokens que el embed-js para look & feel
 * consistente entre ambos canales.
 */

.cc-wrap {
    --cc-bg: #ffffff;
    --cc-fg: #0f172a;
    --cc-muted: #64748b;
    --cc-border: #e2e8f0;
    --cc-brand: #0ea5e9;
    --cc-brand-fg: #ffffff;
    --cc-star: #f59e0b;
    --cc-radius: 12px;
    --cc-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    color: var(--cc-fg);
    font-size: 15px;
    line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
    .cc-wrap:not(.cc-theme-light) {
        --cc-bg: #0f172a;
        --cc-fg: #f8fafc;
        --cc-muted: #94a3b8;
        --cc-border: #1e293b;
        --cc-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    }
}
.cc-wrap.cc-theme-dark {
    --cc-bg: #0f172a;
    --cc-fg: #f8fafc;
    --cc-muted: #94a3b8;
    --cc-border: #1e293b;
    --cc-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.cc-wrap *, .cc-wrap *::before, .cc-wrap *::after { box-sizing: border-box; }

.cc-wrap .cc-card {
    background: var(--cc-bg);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    padding: 16px;
    box-shadow: var(--cc-shadow);
}

.cc-wrap .cc-row { display: flex; align-items: center; gap: 12px; }
.cc-wrap .cc-row--end { justify-content: flex-end; margin-top: 12px; }
.cc-wrap .cc-row--between { justify-content: space-between; }
.cc-wrap .cc-col { display: flex; flex-direction: column; gap: 4px; }

.cc-wrap .cc-logo {
    width: 56px; height: 56px; border-radius: 8px;
    object-fit: cover; background: var(--cc-border);
    flex-shrink: 0;
}

.cc-wrap .cc-title { font-weight: 600; font-size: 1.05em; margin: 0; }
.cc-wrap .cc-muted { color: var(--cc-muted); font-size: .9em; }
.cc-wrap .cc-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(14, 165, 233, .15);
    color: var(--cc-brand);
    font-size: .8em; font-weight: 600;
}

.cc-wrap .cc-stars { color: var(--cc-star); letter-spacing: 1px; }

.cc-wrap .cc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 16px; border-radius: 8px;
    background: var(--cc-brand); color: var(--cc-brand-fg) !important;
    text-decoration: none !important; font-weight: 600; font-size: .95em;
    border: 0; cursor: pointer;
    transition: filter .15s;
}
.cc-wrap .cc-btn:hover { filter: brightness(1.08); }

.cc-wrap .cc-link { color: var(--cc-brand); text-decoration: none; }
.cc-wrap .cc-link:hover { text-decoration: underline; }

.cc-wrap .cc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cc-wrap .cc-chip {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    background: rgba(15, 23, 42, .07);
    font-size: .85em; margin: 2px;
}

.cc-wrap .cc-review { padding: 12px; border: 1px solid var(--cc-border); border-radius: 8px; }
.cc-wrap .cc-review header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.cc-wrap .cc-review .cc-author { font-weight: 600; }
.cc-wrap .cc-review .cc-text { color: var(--cc-fg); margin: 4px 0 0; }

.cc-wrap .cc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-wrap .cc-form label { display: flex; flex-direction: column; gap: 4px; font-size: .85em; color: var(--cc-muted); }
.cc-wrap .cc-form input {
    padding: 8px 10px; border: 1px solid var(--cc-border); border-radius: 6px;
    font: inherit; color: var(--cc-fg); background: var(--cc-bg);
}
.cc-wrap .cc-form .cc-submit { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }

.cc-wrap .cc-error {
    padding: 12px; border: 1px solid var(--cc-border); border-radius: 8px;
    color: var(--cc-muted); font-size: .9em;
}

@media (max-width: 520px) {
    .cc-wrap .cc-form { grid-template-columns: 1fr; }
}
