/*
Theme Name: Daily Rubber Price Theme
Theme URI: 
Description: A modern financial dashboard WordPress theme for displaying natural rubber prices and live financial market tickers.
Version: 1.0.0
Author: Antigravity
Text Domain: rubber-price-theme
*/

/* Core Theme Design Variables */
:root {
    --primary-blue: #0b3a2e;        /* Deep luxury emerald pine */
    --secondary-blue: #0f5c49;      /* Forest pine green */
    --accent-green: #10b981;        /* Glowing emerald mint */
    --accent-green-hover: #059669;  /* Emerald dark hover */
    --danger-red: #f43f5e;          /* Premium rose red */
    --body-bg: #f4fbf7;             /* Sleek mint off-white background */
    --card-bg: #ffffff;
    --border-color: #e2f0e9;        /* Soft mint border */
    --text-main: #2f3e3a;           /* Dark pine slate for readability */
    --text-muted: #627b75;          /* Muted pine slate */
    --font-heading: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --card-shadow: 0 10px 30px -10px rgba(11, 58, 46, 0.08), 0 1px 3px rgba(11, 58, 46, 0.02);
    --card-shadow-lg: 0 20px 40px -15px rgba(11, 58, 46, 0.12), 0 1px 5px rgba(11, 58, 46, 0.03);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Global Reset & Body Styles */
html, body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: var(--body-bg) !important;
}
body {
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-blue);
    letter-spacing: -0.02em;
}

a {
    color: var(--secondary-blue);
    text-decoration: none;
    transition: var(--transition-smooth);
}
a:hover {
    color: var(--accent-green);
}

/* Sticky Header Customization */
.rpm-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    z-index: 1030;
    box-shadow: 0 4px 30px rgba(11, 58, 46, 0.02);
}
.rpm-header .navbar-brand img {
    max-height: 42px;
    width: auto;
}
.rpm-header .navbar-brand span {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary-blue);
    letter-spacing: -0.03em;
}
.rpm-header .nav-link {
    font-weight: 600;
    color: var(--text-main);
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition-smooth);
}
.rpm-header .nav-link:hover,
.rpm-header .nav-item.active .nav-link {
    color: var(--accent-green) !important;
    background-color: rgba(16, 185, 129, 0.08);
}
.rpm-live-clock {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background-color: rgba(16, 185, 129, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Hero Dashboard Section */
.rpm-hero {
    background: radial-gradient(circle at 10% 20%, #082f25 0%, #0b3a2e 100%);
    color: #ffffff;
    padding: 4.5rem 0;
    margin-bottom: 2.5rem;
    text-align: center;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 15px 30px rgba(11, 58, 46, 0.15);
}
.rpm-hero h1 {
    color: #ffffff;
    font-size: 2.75rem;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}
.rpm-hero p {
    color: rgba(244, 251, 247, 0.8);
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto;
    font-weight: 400;
}

/* Card General Styling */
.rpm-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 2.25rem;
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
}
.rpm-card:hover {
    box-shadow: var(--card-shadow-lg);
    transform: translateY(-3px);
}
.rpm-card-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}
.rpm-card-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--accent-green);
}

/* Rubber Price Table Custom Styling */
.rpm-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(11, 58, 46, 0.02);
}
.rpm-price-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}
.rpm-price-table th {
    background: linear-gradient(135deg, #0b3a2e 0%, #0f5c49 100%);
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    padding: 1.15rem;
    text-align: center;
}
.rpm-price-table th:first-child {
    text-align: left;
    border-top-left-radius: 12px;
}
.rpm-price-table th:last-child {
    border-top-right-radius: 12px;
}
.rpm-price-table td {
    padding: 1.15rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    vertical-align: middle;
}
.rpm-price-table td:first-child {
    text-align: left;
    font-weight: 700;
    color: var(--primary-blue);
}
.rpm-price-table tbody tr {
    transition: var(--transition-smooth);
}
.rpm-price-table tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.03);
}
.rpm-price-table tbody tr:last-child td {
    border-bottom: none;
}

/* Price Movement Badges */
.price-value-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.price-movement-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.price-movement-badge.up {
    color: #047857;
    background-color: #ecfdf5;
}
.price-movement-badge.down {
    color: #b91c1c;
    background-color: #fef2f2;
}
.price-movement-badge.neutral {
    color: var(--text-muted);
    background-color: #f1f5f9;
}

/* Live Market Dashboard Cards */
.ticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.ticker-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.ticker-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: var(--transition-smooth);
}
.ticker-card:hover::before {
    background: var(--accent-green);
}
.ticker-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-lg);
    border-color: rgba(16, 185, 129, 0.2);
}
.ticker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.ticker-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}
.ticker-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    background-color: rgba(16, 185, 129, 0.06);
    color: var(--secondary-blue);
}
.ticker-price {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}
.ticker-change-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}
.ticker-change-row.positive {
    color: #047857;
}
.ticker-change-row.negative {
    color: #b91c1c;
}

/* Custom Pagination styling */
.rpm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 1.5rem;
}
.rpm-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition-smooth);
}
.rpm-pagination .page-numbers:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background-color: rgba(16, 185, 129, 0.05);
}
.rpm-pagination .page-numbers.current {
    background-color: var(--accent-green);
    color: #ffffff;
    border-color: var(--accent-green);
}

/* Footer layout */
.rpm-footer {
    background-color: var(--primary-blue);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 1.5rem 0;
    margin-top: 4rem;
}
.rpm-footer h4, .rpm-footer h5 {
    color: #ffffff;
    margin-bottom: 1.25rem;
}
.rpm-footer a {
    color: rgba(255, 255, 255, 0.7);
}
.rpm-footer a:hover {
    color: var(--accent-green);
}
.rpm-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    font-size: 0.85rem;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .rpm-hero {
        padding: 2.5rem 0;
        border-radius: 0;
    }
    .rpm-hero h1 {
        font-size: 1.85rem;
    }
    .rpm-price-table th, .rpm-price-table td {
        padding: 0.5rem 0.2rem !important;
        font-size: 0.75rem !important;
    }
    .rpm-price-table th {
        font-size: 0.7rem !important;
        letter-spacing: 0.01em !important;
        padding: 0.6rem 0.2rem !important;
    }
    .price-value-container {
        gap: 2px !important;
    }
    .price-movement-badge {
        font-size: 0.62rem !important;
        padding: 0.08rem 0.2rem !important;
        margin-top: 0.15rem !important;
    }
    .rpm-card {
        padding: 1rem !important;
    }
    
    /* 2-Column Grid for Live Market Tickers on Mobile */
    .ticker-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .ticker-card {
        padding: 0.85rem !important;
        border-radius: 12px !important;
    }
    .ticker-header {
        margin-bottom: 0.5rem !important;
    }
    .ticker-name {
        font-size: 0.78rem !important;
    }
    .ticker-badge {
        font-size: 0.58rem !important;
        padding: 0.1rem 0.3rem !important;
    }
    .ticker-price {
        font-size: 1.1rem !important;
        margin-bottom: 0.15rem !important;
    }
    .ticker-change-row {
        font-size: 0.68rem !important;
        gap: 4px !important;
    }
}

@media (max-width: 480px) {
    .rpm-price-table th, .rpm-price-table td {
        padding: 0.4rem 0.12rem !important;
        font-size: 0.7rem !important;
    }
    .rpm-price-table th {
        font-size: 0.64rem !important;
        padding: 0.5rem 0.12rem !important;
    }
    .price-movement-badge {
        font-size: 0.58rem !important;
        padding: 0.05rem 0.12rem !important;
    }
}

/* 3-Dot Mobile Menu Toggle Button */
.rpm-3dot-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: rgba(16, 185, 129, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    transition: var(--transition-smooth) !important;
    color: var(--text-main) !important;
    cursor: pointer;
    padding: 0 !important;
    box-shadow: none !important;
}
.rpm-3dot-toggle:hover, .rpm-3dot-toggle:focus {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--accent-green) !important;
    transform: rotate(90deg);
}
.rpm-3dot-toggle span {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    display: inline-block;
    transform: translateY(-2px);
}

