/* Adams Crypto Analysis — Frontend Styles */

/* Container */
.adamca-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1a1a2e;
    background: #f8f9fc;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* Banner */
.adamca-banner-wrap {
    width: 100%;
    line-height: 0;
}

.adamca-banner {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px 12px 0 0;
    object-fit: cover;
    max-height: 220px;
    object-position: center;
}

/* Legal disclaimer */
.adamca-disclaimer {
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    padding: 10px 16px;
    font-size: 0.8em;
    color: #78540a;
    line-height: 1.5;
}

.adamca-disclaimer p {
    margin: 0;
}

.adamca-dark-mode .adamca-disclaimer {
    background: #1e1500;
    border-left-color: #f59e0b;
    color: #f0c060;
}

/* Inner content wrapper (everything after banner/disclaimer) */
.adamca-inner {
    padding: 20px 24px 0;
}

/* CoinGecko attribution */
.adamca-cg-attribution {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    padding-bottom: 16px;
    font-size: 0.75em;
    opacity: 0.65;
}

.adamca-cg-attribution:hover {
    opacity: 1;
}

.adamca-cg-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

.adamca-cg-attribution a {
    color: inherit;
    text-decoration: none;
}

.adamca-cg-attribution a:hover {
    text-decoration: underline;
}

/* Dark mode */
.adamca-container.adamca-dark-mode {
    background: #0a0f1f;
    color: #e0e0e0;
}

/* Header */
.adamca-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.adamca-title {
    font-size: 1.8em;
    margin: 0 0 4px;
    font-weight: 700;
}

.adamca-subtitle {
    font-size: 1em;
    margin: 0;
    opacity: 0.7;
}

.adamca-dark-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: 1px solid currentColor;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.adamca-dark-toggle:hover {
    opacity: 0.7;
}

/* Mode tabs */
.adamca-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.adamca-tab {
    padding: 8px 20px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    font-size: 0.9em;
    color: inherit;
    transition: all 0.2s;
}

.adamca-tab.active {
    background: #3861fb;
    color: #fff;
    border-color: #3861fb;
}

.adamca-dark-mode .adamca-tab {
    border-color: #333;
}

.adamca-dark-mode .adamca-tab.active {
    background: #3861fb;
    border-color: #3861fb;
}

/* Coin selector */
.adamca-coin-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.adamca-select,
.adamca-custom-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    background: #fff;
    color: #1a1a2e;
}

.adamca-dark-mode .adamca-select,
.adamca-dark-mode .adamca-custom-input {
    background: #151b30;
    border-color: #333;
    color: #e0e0e0;
}

.adamca-analyze-button {
    padding: 10px 28px;
    background: #3861fb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.adamca-analyze-button:hover {
    background: #2a4fd6;
}

.adamca-analyze-button:disabled {
    background: #888;
    cursor: not-allowed;
}

/* TradingView chart */
.adamca-tradingview-chart {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
}

.adamca-tradingview-chart iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* Loading spinner */
.adamca-loading-spinner {
    text-align: center;
    padding: 40px 20px;
}

.adamca-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: #3861fb;
    border-radius: 50%;
    animation: adamca-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes adamca-spin {
    to { transform: rotate(360deg); }
}

/* Cache indicator */
.adamca-cache-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.85em;
    opacity: 0.8;
}

.adamca-cache-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.adamca-cache-dot.cached {
    background: #3861fb;
}

.adamca-cache-dot.fresh {
    background: #00c853;
}

/* Result area */
.adamca-result-area {
    line-height: 1.6;
}

/* Error */
.adamca-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.adamca-dark-mode .adamca-error {
    background: #2a0a0a;
    border-color: #500;
    color: #f88;
}

/* AI-generated analysis container styles */
.adamca-result-area .analysis-container {
    line-height: 1.7;
}

.adamca-result-area .analysis-container h2 {
    font-size: 1.4em;
    margin: 24px 0 12px;
    border-bottom: 2px solid #3861fb;
    padding-bottom: 6px;
}

.adamca-result-area .analysis-container h3 {
    font-size: 1.15em;
    margin: 20px 0 10px;
    color: #3861fb;
}

.adamca-dark-mode .adamca-result-area .analysis-container h3 {
    color: #6b8aff;
}

.adamca-result-area .analysis-container ul {
    padding-left: 20px;
}

.adamca-result-area .analysis-container li {
    margin-bottom: 6px;
}

.adamca-result-area .analysis-container pre {
    white-space: pre-wrap;
    font-size: 0.85em;
    background: #0a0f1f;
    padding: 12px;
    border-radius: 8px;
    color: #0f0;
    overflow-x: auto;
}

.adamca-result-area .analysis-container img {
    max-width: 180px;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 600px) {
    .adamca-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .adamca-banner {
        max-height: 140px;
    }

    .adamca-coin-selector {
        flex-direction: column;
    }

    .adamca-analyze-button {
        width: 100%;
    }

    .adamca-mode-tabs {
        flex-wrap: wrap;
    }

    .adamca-tradingview-chart iframe {
        height: 300px;
    }
}
