/* ═══════════════════════════════════════════════════════════════════
   TRADING HUB - COMPONENTS CSS
   Componentes reutilizables
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow-gold);
}

.card-elevated {
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-card);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-4px);
    border-color: var(--accent-gold);
}

.card-interactive:active {
    transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Primary button - Gold gradient */
.btn-primary {
    background: var(--gradient-gold);
    color: var(--bg-primary);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Secondary button */
.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--accent-gold);
    background: var(--bg-tertiary);
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 16px;
}

.btn-ghost:hover:not(:disabled) {
    color: var(--accent-gold);
    background: var(--bg-gold-medium);
}

/* Danger button */
.btn-danger {
    background: var(--bg-red-strong);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

.btn-danger:hover:not(:disabled) {
    background: var(--accent-red);
    color: white;
}

/* Success button */
.btn-success {
    background: var(--bg-green-strong);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.btn-success:hover:not(:disabled) {
    background: var(--accent-green);
    color: white;
}

/* Icon button */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* Button sizes */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 700;
}

/* Full width */
.btn-full {
    width: 100%;
}

/* Loading state */
.btn.loading .btn-text {
    display: none;
}

.btn .spinner {
    display: none;
}

.btn.loading .spinner {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-gold {
    background: var(--bg-gold-strong);
    color: var(--accent-gold);
    border: 1px solid var(--border-gold);
}

.badge-green {
    background: var(--bg-green-strong);
    color: var(--accent-green);
    border: 1px solid var(--border-green);
}

.badge-red {
    background: var(--bg-red-strong);
    color: var(--accent-red);
    border: 1px solid var(--border-red);
}

.badge-yellow {
    background: rgba(var(--color-yellow-rgb), 0.15);
    color: var(--accent-yellow);
    border: 1px solid rgba(var(--color-yellow-rgb), 0.3);
}

.badge-blue {
    background: rgba(var(--color-blue-rgb), 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(var(--color-blue-rgb), 0.3);
}

/* Badge with pulse dot */
.badge-live::before {
    content: '';
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   INPUT FIELDS
   ═══════════════════════════════════════════════════════════════════ */

.input-group {
    margin-bottom: var(--spacing-md);
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    transition: all var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-focus-gold);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Input with icon/prefix */
.input-wrapper {
    position: relative;
}

.input-wrapper .input-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
}

.input-wrapper .input-field {
    padding-left: 40px;
}

.input-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

/* ═══════════════════════════════════════════════════════════════════
   DISCLAIMER BOX
   ═══════════════════════════════════════════════════════════════════ */

.disclaimer-box {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-gold);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.disclaimer-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: var(--spacing-md);
}

.disclaimer-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.disclaimer-text p {
    margin-bottom: var(--spacing-sm);
}

.disclaimer-text p:last-child {
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   LOADER / SPINNER
   ═══════════════════════════════════════════════════════════════════ */

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-sm {
    width: 20px;
    height: 20px;
    border-width: 3px;
}

.loader-lg {
    width: 64px;
    height: 64px;
    border-width: 5px;
}

/* Inline spinner for buttons */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(var(--color-black-rgb), 0.2);
    border-top-color: var(--bg-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: var(--z-modal);
}

.loading-text {
    margin-top: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    pointer-events: none;
}

.toast {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 24px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.toast-error {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.toast-info {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER BADGE (En Vivo)
   ═══════════════════════════════════════════════════════════════════ */

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-gold-medium);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--border-gold);
}

.header-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   ERROR MESSAGE
   ═══════════════════════════════════════════════════════════════════ */

.error-message {
    display: none;
    background: var(--bg-red-medium);
    border: 1px solid var(--accent-red);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: var(--accent-red);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.error-message.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════════
   PRIVACY NOTE
   ═══════════════════════════════════════════════════════════════════ */

.privacy-note {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 12px 16px;
    background: var(--bg-gold-medium);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--accent-gold);
}

/* ═══════════════════════════════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════════════════════════════ */

.divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-lg) 0;
}

.divider-gold {
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

/* ═══════════════════════════════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════════════════════════════ */

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-primary);
    font-size: 16px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

/* ═══════════════════════════════════════════════════════════════════
   PRODUCT CARD (for dashboard)
   ═══════════════════════════════════════════════════════════════════ */

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-gold-strong);
    box-shadow: var(--shadow-glow-gold);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card.disabled {
    opacity: 0.6;
    cursor: default;
}

.product-card.disabled:hover {
    transform: none;
    border-color: var(--border-color);
    box-shadow: none;
}

.product-card.disabled::before {
    background: var(--border-color);
}

.product-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 180px;
    overflow: hidden;
}

.product-icon .product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    flex-grow: 1;
}

.product-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
}

/* ═══════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay-heavy);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--spacing-lg);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    width: 100%;
    max-width: 480px;
    animation: fadeInScale 0.3s ease;
}

.modal-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
}

.modal-body {
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

/* ═══════════════════════════════════════════════════════════════════
   ROCKET ICON (Custom Golden Rocket)
   ═══════════════════════════════════════════════════════════════════ */

.rocket-icon {
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
}

/* Tamaño pequeño - para botones e inline */
.rocket-icon-sm {
    width: 18px;
    height: 18px;
}

/* Tamaño mediano - para texto general */
.rocket-icon-md {
    width: 24px;
    height: 24px;
}

/* Tamaño grande - para hero y cards */
.rocket-icon-lg {
    width: 48px;
    height: 48px;
}

/* Tamaño extra grande - para login */
.rocket-icon-xl {
    width: 80px;
    height: 80px;
}

/* Tamaño hero - para secciones destacadas */
.rocket-icon-hero {
    width: 120px;
    height: 120px;
    filter: var(--drop-shadow-gold);
}

/* Animación hover opcional */
.rocket-icon-animated:hover {
    animation: rocketBounce 0.5s ease;
}

@keyframes rocketBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .btn-lg {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .product-card {
        padding: var(--spacing-lg);
    }
    
    .disclaimer-box {
        padding: var(--spacing-md);
    }
}

