/**
 * 2suite.io Component Styles
 * Standard styles for icon row, modals, and ecosystem footer
 */

/* ============================================
   Icon Row Component
   ============================================ */
.icon-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: none;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid currentColor;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.icon-btn.icon-blue {
    color: #0EA5E9;
}

.icon-btn.icon-green {
    color: #22C55E;
}

.icon-btn.icon-red {
    color: #EF4444;
}

.icon-btn:hover {
    background: currentColor;
    transform: scale(1.1);
}

.icon-btn:hover svg {
    stroke: white;
}

/* ============================================
   Ecosystem Footer
   ============================================ */
.ecosystem-footer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-top: none;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-secondary, #6B7280);
    line-height: 1.4;
}

.ecosystem-footer a {
    color: var(--accent-color, #6366F1);
    text-decoration: none;
    font-weight: 600;
}

.ecosystem-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============================================
   Modal Overlay & Card (Updates/Help)
   ============================================ */
.updates-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    transition: opacity 0.3s ease;
}

.updates-modal-overlay.hidden {
    display: none;
}

.updates-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.updates-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.updates-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #F1F5F9;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.updates-subtitle {
    font-size: 0.9rem;
    color: #94A3B8;
}

.updates-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #60A5FA;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.updates-back-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.updates-content {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    max-height: 60vh;
}

.updates-footer {
    padding: 0.75rem 2rem;
    border-top: 1px solid #334155;
}

/* ============================================
   Timeline Styles
   ============================================ */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, #0EA5E9, #6366F1);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 14px;
    height: 14px;
    background: #0EA5E9;
    border-radius: 50%;
    border: 3px solid #1E293B;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
}

.timeline-item:first-child .timeline-dot {
    background: #22C55E;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.timeline-version-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.timeline-version {
    font-size: 1.1rem;
    font-weight: 700;
    color: #F1F5F9;
}

.timeline-date {
    font-size: 0.85rem;
    color: #64748B;
}

.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-list li {
    font-size: 0.9rem;
    color: #CBD5E1;
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.timeline-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #64748B;
}

/* ============================================
   Help Content Styles
   ============================================ */
.help-content {
    padding: 1rem 2rem;
}

.help-section {
    margin-bottom: 1.5rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #F1F5F9;
    margin: 0 0 0.75rem 0;
}

.help-heading svg {
    color: #0EA5E9;
}

.help-text {
    font-size: 0.9rem;
    color: #CBD5E1;
    line-height: 1.6;
    margin: 0;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-list li {
    font-size: 0.9rem;
    color: #CBD5E1;
    padding: 0.35rem 0;
    padding-left: 1rem;
    position: relative;
}

.help-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #0EA5E9;
}

.help-list strong {
    color: #F1F5F9;
}

/* ============================================
   Admin Button (subtle)
   ============================================ */
.text-btn.subtle {
    background: transparent;
    border: none;
    color: #475569;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.text-btn.subtle:hover {
    color: #94A3B8;
    background: rgba(148, 163, 184, 0.1);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .updates-card {
        max-width: 100%;
        margin: 0.5rem;
    }

    .updates-header {
        padding: 1rem 1.25rem;
        flex-direction: column;
        gap: 1rem;
    }

    .updates-content,
    .help-content {
        padding: 1rem 1.25rem;
    }

    .updates-title h2 {
        font-size: 1.4rem;
    }
}

/* ============================================
   Admin Dashboard Styles
   ============================================ */
.admin-login,
.admin-dashboard {
    width: 100%;
    max-width: 500px;
    padding: 1.5rem;
}

.admin-login h3,
.admin-dashboard h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #F1F5F9;
    white-space: nowrap;
}

.admin-login .filter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #F1F5F9;
    font-size: 0.9rem;
}

.admin-login .filter-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.admin-login .action-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-login .action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.admin-login .action-btn.secondary {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94A3B8;
}

.admin-login .action-btn.secondary:hover {
    background: rgba(148, 163, 184, 0.1);
}

.admin-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-header h3 {
    flex: 1;
    margin: 0;
}

.tool-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #60A5FA;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tool-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.admin-stats-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stats-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.row-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748B;
    min-width: 85px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.row-label svg {
    color: #64748B;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.5rem;
}

.stat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #F1F5F9;
}

.stat-val.text-primary {
    color: #3B82F6;
}

.stat-val.text-info {
    color: #0EA5E9;
}

.stat-val.text-success {
    color: #22C55E;
}

.stat-val.text-danger {
    color: #EF4444;
}

.stat-lbl {
    font-size: 0.65rem;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-logs-container {
    margin-top: 1rem;
}

.admin-logs-container h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94A3B8;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-logs {
    max-height: 150px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.log-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.log-time {
    font-size: 0.75rem;
    color: #64748B;
    font-family: monospace;
}

.log-vote {
    display: flex;
    align-items: center;
}

.log-comment {
    flex: 1;
    font-size: 0.8rem;
    color: #CBD5E1;
}

.no-logs {
    padding: 1rem;
    text-align: center;
    color: #64748B;
    font-size: 0.85rem;
}

.glass-panel {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Toast Notifications
   ============================================ */
.admin-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10000;
    pointer-events: none;
}

.admin-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.admin-toast.hidden {
    display: none;
}

.admin-toast.error {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

/* Tool buttons with icon + text */
.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #60A5FA;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tool-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.tool-btn:active {
    transform: translateY(0);
}

.tool-btn svg {
    flex-shrink: 0;
}

/* Light theme adjustments */
@media (prefers-color-scheme: light) {
    .admin-toast {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }

    .tool-btn {
        background: rgba(59, 130, 246, 0.08);
        border-color: rgba(59, 130, 246, 0.25);
        color: #2563EB;
    }

    .tool-btn:hover {
        background: rgba(59, 130, 246, 0.15);
        border-color: rgba(59, 130, 246, 0.4);
    }
}
/* ============================================
   Feedback Popup Styles
   ============================================ */
.feedback-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.feedback-popup-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.feedback-popup {
    width: 90%;
    max-width: 400px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.99));
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(1);
    transition: transform 0.2s ease;
}

.feedback-popup-overlay.hidden .feedback-popup {
    transform: scale(0.95);
}

.feedback-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.feedback-popup-header span {
    font-size: 1rem;
    font-weight: 600;
    color: #F1F5F9;
}

.feedback-popup-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    color: #64748B;
    transition: all 0.2s ease;
}

.feedback-popup-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.feedback-popup-body {
    padding: 1.25rem;
}

.feedback-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #F1F5F9;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.feedback-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
}

.feedback-input::placeholder {
    color: #64748B;
}

.feedback-popup-actions {
    display: flex;
    justify-content: flex-end;
}

.feedback-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-submit-btn:hover {
    background: linear-gradient(135deg, #60A5FA, #3B82F6);
    transform: translateY(-1px);
}

.feedback-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.feedback-thanks {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    color: #22C55E;
    font-size: 1rem;
    font-weight: 500;
}

/* Light theme */
@media (prefers-color-scheme: light) {
    .feedback-popup {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.99));
        border-color: rgba(148, 163, 184, 0.25);
    }
    
    .feedback-popup-header span {
        color: #1E293B;
    }
    
    .feedback-input {
        background: rgba(241, 245, 249, 0.8);
        border-color: rgba(148, 163, 184, 0.3);
        color: #1E293B;
    }
}
