/* Custom CSS for RoItems.com */

:root {
    --bs-primary: #f7931d;
    --bs-primary-rgb: 247, 147, 29;
    --bs-secondary: #6c757d;
    --bs-success: #28a745;
    --bs-info: #17a2b8;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #343a40;
}

/* General Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar Customization */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
    cursor: pointer;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #8b5cf6 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Search Box */
.search-box {
    max-width: 600px;
    margin: 2rem auto 0;
}

.search-box .form-control {
    border-radius: 50px 0 0 50px;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.search-box .btn {
    border-radius: 0 50px 50px 0;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Listing Cards */
.listing-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    cursor: pointer;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.listing-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.listing-card .price-tag {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--bs-success);
}

.listing-card .crypto-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
}

/* Mini Listing Cards for Preview Sections */
.listing-card-mini {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

.listing-card-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary);
}

.listing-card-mini .card-img-top {
    border-bottom: 1px solid #e0e0e0;
}

.listing-card-mini .card-body {
    background: #fafafa;
}

.listing-card-mini .card-title {
    line-height: 1.2;
    min-height: 1.2rem;
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--bs-light);
}

.user-avatar-small {
    width: 25px;
    height: 25px;
}

.user-avatar-large {
    width: 100px;
    height: 100px;
}

/* Online Indicator */
.online-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Status Badges */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-sold {
    background: #f8d7da;
    color: #721c24;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

/* Transaction Status */
.transaction-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Crypto Icons */
.crypto-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.crypto-icon-small {
    width: 16px;
    height: 16px;
}

.crypto-icon-large {
    width: 48px;
    height: 48px;
}

/* Dashboard Cards */
.dashboard-card {
    border-left: 4px solid var(--bs-primary);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateX(5px);
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--bs-primary);
}

.dashboard-card .stat-label {
    color: var(--bs-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Forms */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--bs-primary);
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(247, 147, 29, 0.25);
}

/* Dark Theme Form Inputs and Labels */
.dark-input {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

.dark-input::placeholder {
    color: #9ca3af !important;
}

.dark-input:focus {
    background-color: #374151 !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(247, 147, 29, 0.25) !important;
    color: #f3f4f6 !important;
}

.dark-input:disabled {
    background-color: #1f2937 !important;
    color: #9ca3af !important;
}

.dark-label {
    color: #d1d5db !important;
}

.dark-checkbox {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
}

.dark-checkbox:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.dark-checkbox:focus {
    box-shadow: 0 0 0 0.25rem rgba(247, 147, 29, 0.25) !important;
}

/* Dark card backgrounds for form containers */
.dark-card {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
}

/* Dark text utilities */
.dark-text {
    color: #f3f4f6 !important;
}

.dark-text-muted {
    color: #9ca3af !important;
}

/* Dark divider line */
.dark-divider {
    border-color: #374151 !important;
}

/* 3D Primary Button */
.btn-3d-primary {
    color: #101026 !important;
    background: linear-gradient(#ffb257 0%, #ffdf6f 100%) !important;
    box-shadow: inset 0 0 0 1px #ffffff26, 0 6px #d39234, 0 6px 8px 1px #00000073 !important;
    border: none !important;
    transition: all 0.1s ease !important;
    position: relative !important;
    top: 0 !important;
}

.btn-3d-primary:hover {
    top: 2px !important;
    box-shadow: inset 0 0 0 1px #ffffff26, 0 4px #d39234, 0 4px 6px 1px #00000073 !important;
}

.btn-3d-primary:active {
    top: 4px !important;
    box-shadow: inset 0 0 0 1px #ffffff26, 0 2px #d39234, 0 2px 4px 1px #00000073 !important;
}

/* 3D White Button (for Google sign-in, etc.) */
.btn-3d-white {
    color: #1f2937 !important;
    background: linear-gradient(#ffffff 0%, #f3f4f6 100%) !important;
    box-shadow: inset 0 0 0 1px #ffffff26, 0 6px #9ca3af, 0 6px 8px 1px #00000073 !important;
    border: none !important;
    transition: all 0.1s ease !important;
    position: relative !important;
    top: 0 !important;
}

.btn-3d-white:hover {
    top: 2px !important;
    box-shadow: inset 0 0 0 1px #ffffff26, 0 4px #9ca3af, 0 4px 6px 1px #00000073 !important;
    color: #1f2937 !important;
}

.btn-3d-white:active {
    top: 4px !important;
    box-shadow: inset 0 0 0 1px #ffffff26, 0 2px #9ca3af, 0 2px 4px 1px #00000073 !important;
}

/* 3D Balance Display Widget */
.balance-widget {
    display: flex;
    align-items: stretch;
    background: linear-gradient(180deg, #252a3a 0%, #1a1f2e 100%);
    border-radius: 25px;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    height: 42px;
}

.balance-user {
    display: flex;
    align-items: center;
    padding: 0 10px 0 6px;
    gap: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.balance-username {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e5e7eb;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.balance-amount {
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
}

.balance-icon {
    width: 26px;
    height: 26px;
    background: linear-gradient(145deg, #f7931d 0%, #e8820c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 10px;
    color: #ffffff;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.balance-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.balance-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffcc5c 0%, #f7931d 100%);
    padding: 0 18px;
    color: #1a1f2e;
    font-size: 1.6rem;
    font-weight: 700;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.balance-add-btn:hover {
    background: linear-gradient(180deg, #ffd97a 0%, #ffab3d 100%);
    color: #1a1f2e;
}

.balance-add-btn:active {
    background: linear-gradient(180deg, #f5bc40 0%, #e8820c 100%);
}

/* Balance Widget Mobile Responsive */
@media (max-width: 640px) {
    .balance-widget-mobile {
        height: 36px;
        border-radius: 20px;
    }

    .balance-widget-mobile .balance-user {
        padding: 0 6px 0 4px;
        gap: 0;
    }

    .balance-widget-mobile .balance-avatar {
        width: 24px;
        height: 24px;
    }

    .balance-widget-mobile .balance-amount {
        padding: 0 10px;
        gap: 6px;
    }

    .balance-widget-mobile .balance-icon {
        width: 20px;
        height: 20px;
        font-size: 8px;
    }

    .balance-widget-mobile .balance-value {
        font-size: 0.95rem;
    }

    .balance-widget-mobile .balance-add-btn {
        padding: 0 12px;
    }

    .balance-widget-mobile .balance-add-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* File Upload Area */
.upload-area {
    border: 2px dashed var(--bs-secondary);
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.05);
}

.upload-area.dragover {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.1);
}

/* Chat/Message Styles */
.message-list {
    max-height: 500px;
    overflow-y: auto;
}

.message-item {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-light);
    transition: background 0.3s ease;
}

.message-item:hover {
    background: var(--bs-light);
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    margin-bottom: 0.5rem;
}

.message-bubble.sent {
    background: var(--bs-primary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message-bubble.received {
    background: var(--bs-light);
    border-bottom-left-radius: 5px;
}

/* Rating Stars */
.rating-stars {
    color: #ffc107;
}

.rating-stars .bi-star-fill {
    margin-right: 2px;
}

.rating-stars .bi-star {
    margin-right: 2px;
    color: #dee2e6;
}

/* Pagination Custom */
.pagination .page-link {
    color: var(--bs-primary);
    border-radius: 50%;
    margin: 0 2px;
}

.pagination .page-link:hover {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

.pagination .page-item.active .page-link {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive-stack tr {
        display: block;
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }
    
    .table-responsive-stack td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
    
    .table-responsive-stack td:before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 45%;
        text-align: left;
        font-weight: bold;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--bs-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Mobile Optimizations */
@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .search-box .form-control,
    .search-box .btn {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .listing-card .card-img-top {
        height: 150px;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    body.dark-mode .card {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    body.dark-mode .navbar {
        background: #2a2a2a !important;
    }
    
    body.dark-mode .dropdown-menu {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    body.dark-mode .form-control {
        background: #2a2a2a;
        border-color: #3a3a3a;
        color: #e0e0e0;
    }
}

/* Crypto Price Display in Footer */
.crypto-price-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.crypto-price-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.crypto-price-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.crypto-price-item img {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

.crypto-price-item .crypto-symbol {
    font-weight: 600;
    margin-right: 0.5rem;
}

.crypto-price-item .crypto-value {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Responsive crypto prices */
@media (max-width: 768px) {
    .crypto-price-display {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .crypto-price-item {
        font-size: 0.9rem;
    }
}

.crypto-price-item {
    display: inline-block;
}   

/* Navbar and Footer Custom Colors */

.navbar {
  background-color: #2b2d31 !important;
}
.hero-section {
  background: #272B33 !important;
}


/* Footer background color */
footer.bg-dark {
  background-color: #2b2d31 !important;
}