/* bankey.css - CSS for Key Selling page */

/* ===========================================
   KEY SPECIFIC STYLES
   =========================================== */

/* Products Container */
.products-container {
    margin-top: 2rem;
}

/* Category Header */
.key-category-header {
    margin: 2rem 0 1.5rem 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.key-category-header i {
    font-size: 1.3rem;
}

/* Key Product Section */
.key-product-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.key-product-header-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.key-product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.key-product-title i {
    color: #667eea;
}

/* Key Type Card */
.key-type-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.key-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.key-type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.key-type-card:hover::before {
    transform: scaleX(1);
}

.key-type-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.key-type-card.disabled:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Key Product Card (legacy - keep for compatibility) */
.key-product-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.key-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.key-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.key-product-card:hover::before {
    transform: scaleX(1);
}

.key-product-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.key-product-card.disabled:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Key Type Header */
.key-type-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Product Header (legacy) */
.key-product-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.key-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.key-product-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

/* Key Type Info */
.key-type-info {
    flex: 1;
    margin-left: 1rem;
}

.key-type-name {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.key-type-description {
    color: #718096;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* Product Info (legacy) */
.key-product-info {
    flex: 1;
    margin-left: 1rem;
}

.key-product-name {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.key-product-description {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Key Type Price & Stats */
.key-type-price-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

/* Product Price & Stats Combined (legacy) */
.key-product-price-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e9ecef;
}

.key-available-badge {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.key-available-badge i {
    font-size: 0.75rem;
}

.key-price-badge {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(246, 173, 85, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Key Type Actions */
.key-type-actions {
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Product Actions (legacy) */
.key-product-actions {
    margin-top: auto;
    padding-top: 1rem;
}

.key-btn-buy {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.key-btn-buy:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.key-btn-buy:active:not(:disabled) {
    transform: translateY(0);
}

.key-btn-buy:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
}

.key-btn-login {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.key-btn-login:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Empty State */
.key-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.key-empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.key-empty-state h5 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

/* Skeleton Loading */
.skeleton-key-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    height: 100%;
}

.skeleton-key-card .skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-key-card .skeleton-text.long {
    height: 20px;
    width: 80%;
    margin-bottom: 1rem;
}

.skeleton-key-card .skeleton-text.medium {
    height: 16px;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-key-card .skeleton-badge {
    height: 32px;
    width: 100px;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.skeleton-key-card .skeleton-btn {
    height: 48px;
    width: 100%;
    border-radius: 12px;
    margin-top: auto;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Key Table Styles */
.key-in-row {
    background: #f7fafc;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
}

.key-row {
    transition: background-color 0.2s ease;
}

.key-row:hover {
    background-color: #f7fafc;
}

/* Responsive */
@media (max-width: 768px) {
    .key-product-card {
        padding: 1.25rem;
    }
    
    .key-product-name {
        font-size: 1rem;
    }
    
    .key-product-description {
        font-size: 0.85rem;
    }
    
    .key-price-badge {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .key-available-badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
    
    .key-btn-buy,
    .key-btn-login {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Fade animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Title styling */
.key-title {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* ===========================================
   KEYS MANAGEMENT SECTION
   =========================================== */

.keys-management-card {
    border-radius: 12px;
    overflow: hidden;
}

.keys-management-card .card-body {
    overflow: hidden;
}

.tab-content {
    overflow: hidden;
}

.keys-management-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 1.25rem 1.5rem;
    border: none;
}

.keys-management-header h5 {
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-tabs-custom {
    border-bottom: 2px solid #e9ecef;
    padding: 0 1.5rem;
    margin: 0;
    background: #f8f9fa;
}

.nav-tabs-custom .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    padding: 1rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
}

.nav-tabs-custom .nav-link:hover {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.nav-tabs-custom .nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
    font-weight: 600;
}

.keys-table {
    font-size: 0.95rem;
    overflow: hidden;
}

/* Table responsive wrapper - prevent overflow on hover */
.tab-content .table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
}

.keys-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #495057;
    padding: 1rem;
    white-space: nowrap;
}

.keys-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.key-row {
    transition: all 0.2s ease;
    position: relative;
}

.key-row:hover {
    background-color: #f8f9fa !important;
    transform: translateX(2px);
}

.key-row.table-secondary {
    opacity: 0.7;
}

.key-in-row-group {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #dc3545;
    word-break: break-all;
    line-height: 1.8;
}

.key-in-row-group code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.key-in-row {
    background: #f8f9fa;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #e83e8c;
    font-weight: 500;
    word-break: break-all;
    border: 1px solid #e9ecef;
    max-width: 300px;
    display: inline-block;
}

.btn-copy-key {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.btn-copy-key:hover {
    transform: scale(1.05);
}

.keys-table .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .keys-management-header {
        padding: 1rem;
    }
    
    .keys-management-header h5 {
        font-size: 1rem;
    }
    
    .nav-tabs-custom {
        padding: 0;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs-custom .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .keys-table {
        font-size: 0.85rem;
    }
    
    .keys-table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .keys-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .key-in-row {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
        max-width: 150px;
    }
    
    .keys-table thead th:nth-child(4),
    .keys-table tbody td:nth-child(4) {
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .keys-management-card {
        border-radius: 8px;
    }
    
    .keys-table thead {
        display: none;
    }
    
    .keys-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 1rem;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .keys-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .keys-table tbody td:last-child {
        border-bottom: none;
    }
    
    .keys-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        text-align: left;
        margin-right: 1rem;
        flex-shrink: 0;
    }
    
    .keys-table tbody td:first-child {
        font-weight: 600;
        font-size: 1.1rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid #e9ecef;
        margin-bottom: 0.5rem;
    }
    
    .keys-table tbody td:first-child::before {
        display: none;
    }
    
    .key-in-row {
        max-width: 100%;
        word-break: break-all;
        flex: 1;
    }
    
    .btn-copy-key {
        flex-shrink: 0;
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

