/**
 * OrangeShare Styles
 * P2P File Transfer UI
 */

.orangeshare-container {
    max-width: 600px !important;
    margin: 0 auto !important;
}

/* Status Indicator */
.orangeshare-status {
    margin-bottom: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: white;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.connected .status-dot {
    background: #10b981;
}

.status-indicator.offline .status-dot {
    background: #ef4444;
}

.status-indicator span {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Tabs */
.orangeshare-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 16px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: white;
    color: #FF512F;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tab-btn svg {
    width: 18px;
    height: 18px;
}

/* Users List Grid */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.users-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 20px;
    width: 100%;
    overflow-x: auto !important;
    padding: 10px 5px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.users-list::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.user-card:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.user-avatar {
    width: 55px !important;
    height: 55px !important;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible !important;
    background: transparent !important;
}

.user-info {
    text-align: center;
}

/* Luxury Ornate Frames System for OrangeShare */
.avatar-frame-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.avatar-frame-wrapper::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    padding: 2.5px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    z-index: -1;
}

/* Specific Tiers */
.frame-royal::before {
    background: conic-gradient(from 0deg, #fbbf24, #7c3aed, #fbbf24, #7c3aed, #fbbf24);
    animation: luxuriousRotate 3s linear infinite;
}

.frame-royal::after {
    content: '👑';
    position: absolute;
    top: -10px;
    font-size: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: royalFloat 2s ease-in-out infinite alternate;
}

.frame-royal {
    box-shadow: inset 0 0 8px rgba(124, 58, 237, 0.5), 0 0 12px rgba(251, 191, 36, 0.4), 0 0 0 2px #fff;
}

.frame-diamond::before {
    background: conic-gradient(from 0deg, #06b6d4, #ffffff, #a5f3fc, #06b6d4);
    animation: luxuriousRotate 4s linear infinite;
}

.frame-diamond {
    box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.8), 0 0 15px rgba(6, 182, 212, 0.5), 0 0 0 2px #fff;
}

.frame-platinum::before {
    background: conic-gradient(from 0deg, #3b82f6, #f1f5f9, #3b82f6);
    animation: luxuriousRotate 6s linear infinite;
}

.frame-platinum {
    box-shadow: inset 0 0 4px rgba(59, 130, 246, 0.3), 0 0 8px rgba(59, 130, 246, 0.2), 0 0 0 2px #fff;
}

.frame-gold::before {
    background: conic-gradient(from 0deg, #b45309, #fde047, #f59e0b, #b45309);
    animation: luxuriousRotate 5s linear infinite;
}

.frame-gold {
    box-shadow: 0 0 0 2px #fff;
}

.frame-silver::before {
    background: conic-gradient(from 0deg, #475569, #e2e8f0, #475569);
}

.frame-silver {
    box-shadow: 0 0 0 2px #fff;
}

.frame-bronze::before {
    background: #ea580c;
}

.frame-bronze {
    box-shadow: 0 0 0 2px #fff;
}

@keyframes luxuriousRotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes royalFloat {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-2px) scale(1.05);
    }
}

.user-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.user-status {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    gap: 5px;
}

.badge-nearby {
    color: #10b981;
    background: #ecfdf5;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-online {
    color: #3b82f6;
    background: #eff6ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.connect-mini-btn {
    display: none;
}


.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Discover Header */
.discover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.discover-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f1f5f9;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.75rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.refresh-btn:active {
    transform: scale(0.96);
}

/* Clean up redundant card styles from bottom of file if they exist */
.user-card {
    border: none !important;
    background: transparent !important;
}

/* Connect Card */
.connect-card {
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.search-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.connect-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

.connect-card p {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.connect-btn {
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    background: linear-gradient(135deg, #FF512F, #F09819);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 81, 47, 0.3);
}

.connect-btn:active {
    transform: scale(0.98);
}

/* Active Connections */
.active-connections {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.connection-card {
    background: white;
    border: 2px solid #10b981;
    border-radius: 20px;
    padding: 18px;
}

.connection-avatar {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.connection-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.connection-status {
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.connection-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.send {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.action-btn.disconnect {
    background: #f1f5f9;
    color: #ef4444;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn:active {
    transform: scale(0.96);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.empty-state small {
    color: #cbd5e1;
    font-size: 0.7rem;
}

/* Request Modal (inline style overridden by JS) */
.orangeshare-request-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.orangeshare-request-modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 10000;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .orangeshare-container {
        width: 100% !important;
    }

    .tab-btn span {
        display: none;
    }

    .tab-btn {
        padding: 10px 8px;
    }

    .user-card {
        padding: 12px;
    }

    .connect-card {
        padding: 20px;
    }
}