/* ============================================================================
   Views Component Styles
   Reusable styles for list, card, and coverflow view components
   ============================================================================ */

/* View Toggle Component
   ========================================================================== */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.view-toggle-btn:hover {
    border-color: var(--color-gray-400);
    background: var(--color-gray-50);
}

.view-toggle-btn.active {
    background: #dbfa5e;
    border-color: #dbfa5e;
    color: #000000;
}

.view-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* List View Styles
   ========================================================================== */
.list-view,
.calls-list-view {
    display: block;
}

.list-view .esim-table tbody tr,
.calls-list-view .esim-table tbody tr {
    transition: all 0.2s;
}

.list-view .esim-table tbody tr:hover,
.calls-list-view .esim-table tbody tr:hover {
    background: var(--color-gray-50);
    transform: translateX(4px);
}

/* Card View Styles
   ========================================================================== */
.card-view,
.calls-card-view {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

.call-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.call-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: #dbfa5e;
}

.call-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.call-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.call-card-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.call-card-body {
    display: grid;
    gap: 0.75rem;
}

.call-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.call-card-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.call-card-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
}

/* Coverflow View Styles
   ========================================================================== */
.coverflow-view,
.calls-coverflow-view {
    display: none;
    position: relative;
    perspective: 1200px;
    min-height: 650px;
    padding: 2rem 0;
}

.coverflow-container {
    position: relative;
    width: 100%;
    height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    margin: 0 auto;
    max-width: 1400px;
}

.coverflow-card {
    position: absolute;
    width: 420px;
    max-height: 500px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Coverflow card specific styling */
.coverflow-card .call-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.coverflow-card .call-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.coverflow-card .call-card-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.coverflow-card .call-card-body {
    display: grid;
    gap: 0.5rem;
}

.coverflow-card .call-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.coverflow-card .call-card-row:last-child {
    border-bottom: none;
}

.coverflow-card .call-card-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.coverflow-card .call-card-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
    max-width: 60%;
}

/* Coverflow positioning classes */
.coverflow-card.active {
    z-index: 10;
    transform: translateX(0) translateZ(0) rotateY(0deg) scale(1);
    opacity: 1;
}

.coverflow-card.left {
    transform: translateX(-350px) translateZ(-150px) rotateY(25deg) scale(0.9);
    opacity: 0.7;
    z-index: 5;
}

.coverflow-card.right {
    transform: translateX(350px) translateZ(-150px) rotateY(-25deg) scale(0.9);
    opacity: 0.7;
    z-index: 5;
}

.coverflow-card.hidden-left {
    transform: translateX(-800px) translateZ(-400px) rotateY(45deg) scale(0.7);
    opacity: 0;
    z-index: 1;
}

.coverflow-card.hidden-right {
    transform: translateX(800px) translateZ(-400px) rotateY(-45deg) scale(0.7);
    opacity: 0;
    z-index: 1;
}

/* Coverflow scrollbar styling */
.coverflow-card::-webkit-scrollbar {
    width: 6px;
}

.coverflow-card::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
    border-radius: 3px;
}

.coverflow-card::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.coverflow-card::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Coverflow controls */
.coverflow-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    position: relative;
    z-index: 15;
}

.coverflow-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #dbfa5e;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #000000;
}

.coverflow-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    background: #c4e03a;
}

.coverflow-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: scale(1);
}

.coverflow-counter {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--color-text);
    padding: 0 1rem;
}

/* Call Status Badges
   ========================================================================== */
.call-status {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.call-status.connected {
    background: rgba(16, 163, 74, 0.08);
    color: #16a34a;
    opacity: 0.75;
}

.call-status.routing,
.call-status.authorized {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
    opacity: 0.75;
}

.call-status.failed {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    opacity: 0.75;
}

/* Route Type Styles
   ========================================================================== */
.route-type {
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.7;
}

.route-type.cli {
    color: var(--color-success);
}

.route-type.non-cli {
    color: var(--color-error);
}

/* Vendor Avatar Styles
   ========================================================================== */
.vendor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Utility Classes
   ========================================================================== */
.hidden {
    display: none !important;
}

/* Auto-refresh indicator */
.auto-refresh-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-success-light);
    color: var(--color-success-dark);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}