/**
 * SentimentOwl Design System
 * Unified styling for all components across the site
 * Version: 1.0.0
 */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Brand Colors */
    --owl-primary: #f97316;
    --owl-primary-hover: #ea580c;
    --owl-primary-glow: rgba(249, 115, 22, 0.3);

    /* Semantic Colors */
    --owl-success: #22c55e;
    --owl-danger: #ef4444;
    --owl-warning: #fbbf24;
    --owl-accent: #8b5cf6;

    /* Neutrals */
    --owl-dark: #0f172a;
    --owl-darker: #020617;
    --owl-card: rgba(15, 23, 42, 0.95);
    --owl-card-hover: rgba(20, 30, 50, 0.95);
    --owl-border: rgba(148, 163, 253, 0.12);
    --owl-border-hover: rgba(148, 163, 253, 0.25);

    /* Text */
    --owl-text: #ffffff;
    --owl-text-secondary: #e2e8f0;
    --owl-text-muted: #94a3b8;
    --owl-text-disabled: #64748b;

    /* Spacing */
    --owl-radius-sm: 8px;
    --owl-radius-md: 12px;
    --owl-radius-lg: 16px;
    --owl-radius-xl: 22px;

    /* Shadows */
    --owl-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --owl-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --owl-glow-primary: 0 0 20px var(--owl-primary-glow);

    /* Transitions */
    --owl-transition: all 0.25s ease;
    --owl-transition-fast: all 0.15s ease;
}

/* ============================================
   BUTTON SYSTEM
   ============================================ */

/* Base Button */
.owl-btn,
.plan-btn,
.btn-upgrade,
.swpm-button-wrapper input[type="submit"],
button[type="submit"],
.elementor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--owl-radius-md);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--owl-transition);
    border: none;
    font-family: inherit;
}

/* Primary Button */
.owl-btn-primary,
.plan-btn:not(.disabled),
.btn-upgrade,
.swpm-button-wrapper input[type="submit"],
#code-login-area button[type="submit"],
.owl-hero-form button,
.elementor-button-primary {
    background: var(--owl-primary) !important;
    color: var(--owl-dark) !important;
    border: none !important;
}

.owl-btn-primary:hover,
.plan-btn:not(.disabled):hover,
.btn-upgrade:hover,
.swpm-button-wrapper input[type="submit"]:hover,
#code-login-area button[type="submit"]:hover,
.owl-hero-form button:hover {
    background: var(--owl-primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--owl-glow-primary);
}

/* Secondary Button */
.owl-btn-secondary {
    background: transparent !important;
    color: var(--owl-primary) !important;
    border: 2px solid var(--owl-primary) !important;
}

.owl-btn-secondary:hover {
    background: var(--owl-primary) !important;
    color: var(--owl-dark) !important;
}

/* Ghost Button */
.owl-btn-ghost,
.quick-link {
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--owl-text-secondary) !important;
    border: none !important;
    padding: 0.6rem 1rem;
    border-radius: var(--owl-radius-sm);
}

.owl-btn-ghost:hover,
.quick-link:hover {
    background: var(--owl-primary) !important;
    color: var(--owl-dark) !important;
}

/* Disabled Button */
.owl-btn-disabled,
.plan-btn.disabled {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--owl-text-disabled) !important;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   CARD SYSTEM
   ============================================ */
.owl-card,
.account-card,
.plan-card,
.api-box,
.benefits-box {
    background: var(--owl-card);
    border: 1px solid var(--owl-border);
    border-radius: var(--owl-radius-lg);
    padding: 2rem;
    transition: var(--owl-transition);
}

.owl-card:hover,
.plan-card:hover {
    border-color: var(--owl-border-hover);
    box-shadow: var(--owl-shadow);
}

/* Featured Card */
.plan-card.premium,
.owl-card-featured {
    border-color: var(--owl-primary);
    box-shadow: var(--owl-glow-primary);
}

/* ============================================
   CRYPTO TABLE STYLING
   ============================================ */

/* Table Container */
#crypto-table,
#crypto-table-top10,
.crypto-table-wrapper {
    background: var(--owl-card);
    border: 1px solid var(--owl-border);
    border-radius: var(--owl-radius-lg);
    overflow: hidden;
}

/* Table Base */
#crypto-table table,
#crypto-table-top10 table,
.owl-crypto-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

/* Table Header */
#crypto-table thead,
#crypto-table-top10 thead,
.owl-crypto-table thead {
    background: rgba(0, 0, 0, 0.3);
}

#crypto-table th,
#crypto-table-top10 th,
.owl-crypto-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    color: var(--owl-text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--owl-border);
}

/* Table Rows */
#crypto-table tbody tr,
#crypto-table-top10 tbody tr,
.owl-crypto-table tbody tr {
    border-bottom: 1px solid var(--owl-border);
    transition: var(--owl-transition-fast);
}

#crypto-table tbody tr:last-child,
#crypto-table-top10 tbody tr:last-child {
    border-bottom: none;
}

#crypto-table tbody tr:hover,
#crypto-table-top10 tbody tr:hover,
.owl-crypto-table tbody tr:hover {
    background: rgba(249, 115, 22, 0.05);
    border-left: 3px solid var(--owl-primary);
}

/* Table Cells */
#crypto-table td,
#crypto-table-top10 td,
.owl-crypto-table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    color: var(--owl-text-secondary);
}

/* Coin Name Cell */
#crypto-table td:first-child,
#crypto-table-top10 td:first-child {
    font-weight: 600;
    color: var(--owl-text);
}

/* Positive/Negative Values */
.positive,
.owl-positive,
[class*="positive"] {
    color: var(--owl-success) !important;
}

.negative,
.owl-negative,
[class*="negative"] {
    color: var(--owl-danger) !important;
}

/* Sparkline Alignment */
#crypto-table .sparkline,
#crypto-table-top10 .sparkline {
    display: inline-block;
    vertical-align: middle;
}

/* Pagination */
#crypto-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

#crypto-pagination button,
#crypto-pagination a {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--owl-border);
    border-radius: var(--owl-radius-sm);
    color: var(--owl-text-secondary);
    cursor: pointer;
    transition: var(--owl-transition-fast);
}

#crypto-pagination button:hover,
#crypto-pagination a:hover,
#crypto-pagination button.active,
#crypto-pagination a.active {
    background: var(--owl-primary);
    color: var(--owl-dark);
    border-color: var(--owl-primary);
}

/* ============================================
   SEARCH BAR STYLING
   ============================================ */
#search-bar,
.crypto-search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

#crypto-symbol-input,
.crypto-search-bar input {
    flex: 1;
    min-width: 200px;
    padding: 0.85rem 1.25rem;
    background: var(--owl-card);
    border: 1px solid var(--owl-border);
    border-radius: var(--owl-radius-md);
    color: var(--owl-text);
    font-size: 1rem;
    transition: var(--owl-transition);
}

#crypto-symbol-input:focus,
.crypto-search-bar input:focus {
    outline: none;
    border-color: var(--owl-primary);
    box-shadow: 0 0 0 3px var(--owl-primary-glow);
}

#crypto-symbol-input::placeholder,
.crypto-search-bar input::placeholder {
    color: var(--owl-text-muted);
}

#search-btn,
.crypto-search-bar button {
    padding: 0.85rem 1.5rem;
    background: var(--owl-primary);
    color: var(--owl-dark);
    border: none;
    border-radius: var(--owl-radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--owl-transition);
}

#search-btn:hover,
.crypto-search-bar button:hover {
    background: var(--owl-primary-hover);
    transform: translateY(-2px);
}

/* ============================================
   OVERLAY / BLUR STYLING
   ============================================ */
.restricted-overlay,
.restricted-overlay-full,
#crypto-list-overlay,
#crypto-top10-overlay,
#crypto-symbol-overlay {
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(8px);
    border-radius: var(--owl-radius-lg);
}

.restricted-overlay .overlay-content,
.restricted-overlay-full .overlay-content {
    background: var(--owl-card);
    border: 1px solid var(--owl-border);
    border-radius: var(--owl-radius-lg);
    padding: 2.5rem;
    max-width: 400px;
    text-align: center;
}

.overlay-content h2,
.overlay-content h3 {
    color: var(--owl-text);
    margin-bottom: 0.75rem;
}

.overlay-content p {
    color: var(--owl-text-muted);
    margin-bottom: 1.5rem;
}

.overlay-content input[type="email"],
.overlay-content input[type="text"] {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--owl-border);
    border-radius: var(--owl-radius-sm);
    color: var(--owl-text);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.overlay-content input:focus {
    outline: none;
    border-color: var(--owl-primary);
}

.overlay-content button[type="submit"] {
    width: 100%;
    padding: 0.85rem;
    background: var(--owl-primary);
    color: var(--owl-dark);
    border: none;
    border-radius: var(--owl-radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--owl-transition);
}

.overlay-content button[type="submit"]:hover {
    background: var(--owl-primary-hover);
}

/* ============================================
   SIGNAL / NEWS CARDS
   ============================================ */
.sowl-news-card,
.signal-card {
    background: var(--owl-card);
    border: 1px solid var(--owl-border);
    border-radius: var(--owl-radius-lg);
    padding: 1.5rem;
    transition: var(--owl-transition);
}

.sowl-news-card:hover,
.signal-card:hover {
    border-color: var(--owl-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--owl-shadow);
}

/* Bullish Card */
.sowl-news-card.bullish,
.signal-card.bullish {
    border-left: 4px solid var(--owl-success);
}

/* Bearish Card */
.sowl-news-card.bearish,
.signal-card.bearish {
    border-left: 4px solid var(--owl-danger);
}

/* Sentiment Score Bar */
.sentiment-bar,
.score-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.sentiment-bar-fill,
.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.sentiment-bar-fill.positive,
.score-bar-fill.positive {
    background: var(--owl-success);
}

.sentiment-bar-fill.negative,
.score-bar-fill.negative {
    background: var(--owl-danger);
}

/* ============================================
   FORM INPUTS (Global)
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    background: var(--owl-card);
    border: 1px solid var(--owl-border);
    border-radius: var(--owl-radius-sm);
    color: var(--owl-text);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--owl-transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--owl-primary);
    box-shadow: 0 0 0 3px var(--owl-primary-glow);
}

input::placeholder,
textarea::placeholder {
    color: var(--owl-text-muted);
}

/* ============================================
   LINKS
   ============================================ */
a {
    color: var(--owl-primary);
    text-decoration: none;
    transition: var(--owl-transition-fast);
}

a:hover {
    color: var(--owl-primary-hover);
    text-decoration: underline;
}

/* ============================================
   BADGES / TAGS
   ============================================ */
.owl-badge,
.membership-tag,
.popular-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.owl-badge-primary,
.popular-badge {
    background: var(--owl-primary);
    color: var(--owl-dark);
}

.owl-badge-success {
    background: var(--owl-success);
    color: var(--owl-dark);
}

.owl-badge-danger {
    background: var(--owl-danger);
    color: white;
}

.owl-badge-muted {
    background: rgba(255, 255, 255, 0.1);
    color: var(--owl-text-muted);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.owl-text-primary { color: var(--owl-primary) !important; }
.owl-text-success { color: var(--owl-success) !important; }
.owl-text-danger { color: var(--owl-danger) !important; }
.owl-text-muted { color: var(--owl-text-muted) !important; }

.owl-bg-card { background: var(--owl-card) !important; }
.owl-bg-dark { background: var(--owl-dark) !important; }

.owl-border { border: 1px solid var(--owl-border) !important; }
.owl-rounded { border-radius: var(--owl-radius-md) !important; }
.owl-rounded-lg { border-radius: var(--owl-radius-lg) !important; }

.owl-shadow { box-shadow: var(--owl-shadow) !important; }
.owl-glow { box-shadow: var(--owl-glow-primary) !important; }

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .owl-btn,
    .plan-btn,
    .btn-upgrade {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .owl-card,
    .account-card,
    .plan-card {
        padding: 1.5rem;
    }

    #crypto-table th,
    #crypto-table td,
    #crypto-table-top10 th,
    #crypto-table-top10 td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    /* Hide less important columns on mobile */
    #crypto-table th:nth-child(5),
    #crypto-table td:nth-child(5),
    #crypto-table th:nth-child(6),
    #crypto-table td:nth-child(6) {
        display: none;
    }
}

/* ============================================
   DARK MODE ELEMENTOR OVERRIDES
   ============================================ */
.elementor-widget-text-editor,
.elementor-widget-heading {
    color: var(--owl-text-secondary);
}

.elementor-widget-heading .elementor-heading-title {
    color: var(--owl-text);
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

.owl-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.owl-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.owl-header-logo {
    flex-shrink: 0;
}

.owl-header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

.owl-header-logo img,
.owl-header-logo .custom-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
}

.owl-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}

/* Main Navigation */
.owl-header-nav {
    display: flex;
    align-items: center;
}

.owl-nav-menu {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.owl-nav-item {
    position: relative;
    list-style: none !important;
}

.owl-nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    color: #374151 !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--owl-radius-sm);
    transition: var(--owl-transition-fast);
}

.owl-nav-link:hover {
    color: #0f172a !important;
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none !important;
}

.owl-dropdown-arrow {
    transition: transform 0.2s ease;
}

.owl-dropdown-open .owl-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.owl-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: var(--owl-radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    padding: 0.5rem 0 !important;
    list-style: none !important;
    margin: 0 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--owl-transition-fast);
    z-index: 100;
}

.owl-dropdown-menu li {
    list-style: none !important;
}

.owl-dropdown-right {
    left: auto;
    right: 0;
}

.owl-has-dropdown:hover .owl-dropdown-menu,
.owl-dropdown-open .owl-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.owl-dropdown-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    color: #374151 !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    transition: var(--owl-transition-fast);
}

.owl-dropdown-menu li a:hover {
    color: #0f172a !important;
    background: #f3f4f6 !important;
    text-decoration: none !important;
}

.owl-dropdown-header {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.owl-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* Pro Badge */
.owl-pro-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--owl-primary);
    color: var(--owl-dark);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tier Badges */
.owl-tier-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.owl-tier-pro {
    background: var(--owl-success);
    color: var(--owl-dark);
}

.owl-tier-starter {
    background: var(--owl-accent);
    color: white;
}

.owl-tier-trial {
    background: var(--owl-primary);
    color: var(--owl-dark);
}

.owl-tier-free {
    background: var(--owl-text-muted);
    color: var(--owl-dark);
}

/* Upgrade Link in Dropdown */
.owl-upgrade-link {
    color: var(--owl-primary) !important;
}

.owl-upgrade-link:hover {
    background: rgba(249, 115, 22, 0.1) !important;
}

/* Account Area */
.owl-header-account {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.owl-account-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.owl-account-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border-radius: 50%;
}

.owl-account-icon svg {
    width: 18px;
    height: 18px;
    stroke: #374151;
}

.owl-account-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
}

/* Sign In Button */
.owl-btn-signin {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    background: var(--owl-primary);
    color: var(--owl-dark);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--owl-radius-sm);
    text-decoration: none;
    transition: var(--owl-transition);
}

.owl-btn-signin:hover {
    background: var(--owl-primary-hover);
    transform: translateY(-1px);
}

/* Mobile Toggle */
.owl-mobile-toggle {
    display: none;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.owl-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.owl-hamburger span {
    display: block;
    height: 2px;
    background: #374151;
    border-radius: 2px;
    transition: var(--owl-transition);
}

.owl-mobile-active .owl-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.owl-mobile-active .owl-hamburger span:nth-child(2) {
    opacity: 0;
}

.owl-mobile-active .owl-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.owl-mobile-nav {
    display: none;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
}

.owl-mobile-nav.owl-mobile-open {
    display: block;
}

.owl-mobile-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.owl-mobile-menu li {
    border-bottom: 1px solid #e5e7eb;
    list-style: none !important;
}

.owl-mobile-menu li:last-child {
    border-bottom: none;
}

.owl-mobile-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0.5rem;
    color: #374151 !important;
    text-decoration: none !important;
    font-size: 1rem;
}

.owl-mobile-menu a:hover {
    color: var(--owl-primary) !important;
    text-decoration: none !important;
}

.owl-mobile-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.owl-mobile-signin {
    color: var(--owl-primary) !important;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
    .owl-header-nav {
        display: none;
    }

    .owl-account-name {
        display: none;
    }

    .owl-mobile-toggle {
        display: block;
    }

    .owl-account-dropdown {
        display: none;
    }

    .owl-header-account .owl-btn-signin {
        display: none;
    }
}

@media (max-width: 480px) {
    .owl-header-inner {
        padding: 0 1rem;
        height: 60px;
    }

    .owl-header-logo img {
        height: 32px;
    }
}
