/* ==========================================
   BL Transfer - Specific Styles
   ========================================== */

/* ===== Header ===== */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

/* ===== Logo ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.logo-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

/* ===== Limits Card ===== */
.limits-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    min-width: 250px;
}

.limits-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.limits-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.limit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.limit-label {
    color: var(--text-tertiary);
}

.limit-value {
    font-weight: 600;
    color: var(--cyan-500);
}

/* ===== Main Content ===== */
.main {
    padding: var(--spacing-xl) 0;
    padding-bottom: 70px; /* Space for CTA banner */
}

.section {
    margin-bottom: var(--spacing-lg);
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-md) 0;
}

.hero-cta {
    margin-top: var(--spacing-md);
}

/* ===== Card Header Content ===== */
.card-header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ===== Search Box ===== */
.search-box {
    min-width: 300px;
}

.search-input {
    width: 100%;
}

/* ===== Products Table ===== */
.products-table {
    width: 100%;
    min-width: 600px;
}

.products-table .th-image {
    width: 60px;
    text-align: center;
}

.products-table .product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-primary);
}

.products-table .product-image-placeholder {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 1.5rem;
}

.products-table tbody tr {
    transition: background var(--transition-fast);
    cursor: pointer;
}

.products-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.products-table tbody tr.selected {
    background: rgba(0, 212, 255, 0.1);
}

.products-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
}

.products-loader p {
    color: var(--text-secondary);
    margin: 0;
}

.products-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.products-empty p {
    margin: 0;
}

/* ===== Actions Buttons ===== */
.actions-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.actions-buttons .btn {
    flex: 1;
    min-width: 200px;
}

/* ===== Progress Logs ===== */
.progress-logs {
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
}

.progress-log {
    padding: 0.5rem;
    font-size: 0.875rem;
    font-family: 'Monaco', 'Courier New', monospace;
    border-bottom: 1px solid var(--border-secondary);
}

.progress-log:last-child {
    border-bottom: none;
}

.progress-log.success {
    color: #00ff88;
}

.progress-log.error {
    color: var(--pink-500);
}

.progress-log.info {
    color: var(--cyan-500);
}

/* Custom scrollbar for logs */
.progress-logs::-webkit-scrollbar {
    width: 8px;
}

.progress-logs::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.progress-logs::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: var(--radius-sm);
}

.progress-logs::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== CTA Banner ===== */
.cta-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--gradient-primary);
    padding: var(--spacing-sm) 0;
    z-index: 99;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
    animation: ctaSlideUp var(--transition-base);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cta-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
}

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

.cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    position: relative;
}

.cta-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.cta-close {
    position: absolute;
    top: -8px;
    right: 0;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.cta-close:hover {
    background: rgba(0, 0, 0, 0.5);
}

.cta-banner .btn {
    white-space: nowrap;
}

/* ===== Utility Classes ===== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-success {
    color: #00ff88;
}

.text-error {
    color: var(--pink-500);
}

.text-warning {
    color: #ffd700;
}

/* ===== Animations ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn var(--transition-base);
}

/* ===== Responsive - Mobile ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .limits-card {
        min-width: 0;
        width: 100%;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .card-header-content {
        flex-direction: column;
    }

    .search-box {
        min-width: 0;
        width: 100%;
    }

    .actions-buttons {
        flex-direction: column;
    }

    .actions-buttons .btn {
        min-width: 0;
        width: 100%;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-text {
        font-size: 1rem;
    }

    .cta-banner .btn {
        width: 100%;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    .products-table {
        font-size: 0.75rem;
    }

    .products-table th,
    .products-table td {
        padding: 0.5rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* ===== Mobile - Extra Small ===== */
@media (max-width: 480px) {
    .logo-text {
        font-size: 1.25rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1.125rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* ===== Loading State ===== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.skeleton-button {
    height: 48px;
    width: 120px;
}

/* ===== Badge ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.badge-success {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.badge-error {
    background: rgba(255, 107, 157, 0.2);
    color: var(--pink-500);
}

.badge-info {
    background: rgba(0, 212, 255, 0.2);
    color: var(--cyan-500);
}

.badge-warning {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.empty-state-description {
    font-size: 0.95rem;
    color: var(--text-tertiary);
}

/* ===== Tooltip ===== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .cta-banner,
    .modal,
    .toast-container {
        display: none !important;
    }

    .main {
        padding-bottom: 0;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}
