/**
 * Collab Plugin Frontend Styles
 */

/* Reset and Base Styles */
.collab-frontend * {
    box-sizing: border-box;
}

.collab-frontend {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
}

/* Utility Classes */
.collab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.collab-text-center {
    text-align: center;
}

.collab-hidden {
    display: none !important;
}

.collab-loading {
    opacity: 0.6;
    pointer-events: none;
}

.collab-rotating {
    animation: collab-rotate 1s linear infinite;
}

@keyframes collab-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Button Styles */
.collab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.collab-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.collab-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.collab-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.collab-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.collab-btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #dee2e6;
}

.collab-btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.collab-btn-outline:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.collab-btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.collab-btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
}

.collab-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.collab-btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.collab-btn-block {
    width: 100%;
}

/* Form Styles */
.collab-form-group {
    margin-bottom: 1.5rem;
}

.collab-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.collab-form-input,
.collab-form-textarea,
.collab-form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.collab-form-input:focus,
.collab-form-textarea:focus,
.collab-form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.collab-form-input.error,
.collab-form-textarea.error,
.collab-form-select.error {
    border-color: #dc3545;
}

.collab-form-help {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.collab-form-error {
    font-size: 0.8rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

/* Card Styles */
.collab-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.collab-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.collab-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9fa;
}

.collab-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.collab-card-content {
    padding: 1.5rem;
}

.collab-card-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
}

/* Grid System */
.collab-grid {
    display: grid;
    gap: 1.5rem;
}

.collab-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.collab-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.collab-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Notification Styles */
.collab-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateX(100%);
    animation: slideInRight 0.3s ease-out forwards;
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
    }
}

.collab-notification.success {
    border-left: 4px solid #28a745;
}

.collab-notification.error {
    border-left: 4px solid #dc3545;
}

.collab-notification.warning {
    border-left: 4px solid #ffc107;
}

.collab-notification.info {
    border-left: 4px solid #17a2b8;
}

.notification-content {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-message {
    flex: 1;
    font-size: 0.9rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    margin-left: 1rem;
}

.notification-close:hover {
    color: #495057;
}

/* Message Styles */
.collab-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.collab-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.collab-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.collab-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.collab-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Badge Styles */
.collab-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.collab-badge-success {
    background: #d4edda;
    color: #155724;
}

.collab-badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.collab-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.collab-badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.collab-badge-primary {
    background: #cce7ff;
    color: #004085;
}

/* Loading Spinner */
.collab-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.collab-spinner-large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* Progress Bar */
.collab-progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.collab-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

/* Modal Styles */
.collab-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.collab-modal.active {
    opacity: 1;
    visibility: visible;
}

.collab-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.collab-modal.active .collab-modal-content {
    transform: scale(1);
}

.collab-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collab-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.collab-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
}

.collab-modal-body {
    padding: 1.5rem;
}

.collab-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Table Styles */
.collab-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.collab-table th,
.collab-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.collab-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.collab-table tr:hover {
    background: #f8f9fa;
}

.collab-table tr:last-child td {
    border-bottom: none;
}

/* Tabs */
.collab-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 2rem;
}

.collab-tab-nav {
    display: flex;
    gap: 0;
}

.collab-tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.collab-tab-button:hover {
    color: #495057;
}

.collab-tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.collab-tab-content {
    display: none;
}

.collab-tab-content.active {
    display: block;
}

/* Accordion */
.collab-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.collab-accordion-item {
    border-bottom: 1px solid #e2e8f0;
}

.collab-accordion-item:last-child {
    border-bottom: none;
}

.collab-accordion-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.collab-accordion-header:hover {
    background: #e9ecef;
}

.collab-accordion-title {
    font-weight: 600;
    margin: 0;
}

.collab-accordion-icon {
    transition: transform 0.3s ease;
}

.collab-accordion-item.active .collab-accordion-icon {
    transform: rotate(180deg);
}

.collab-accordion-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.collab-accordion-item.active .collab-accordion-content {
    padding: 1.5rem;
    max-height: 1000px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .collab-container {
        padding: 0 0.5rem;
    }
    
    .collab-grid-2,
    .collab-grid-3,
    .collab-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .collab-btn {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .collab-card-header,
    .collab-card-content,
    .collab-card-footer {
        padding: 1rem;
    }
    
    .collab-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .collab-modal-header,
    .collab-modal-body,
    .collab-modal-footer {
        padding: 1rem;
    }
    
    .collab-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .collab-table {
        font-size: 0.8rem;
    }
    
    .collab-table th,
    .collab-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .collab-tab-nav {
        flex-wrap: wrap;
    }
    
    .collab-tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .collab-btn {
        padding: 0.75rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .collab-btn-large {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .collab-form-input,
    .collab-form-textarea,
    .collab-form-select {
        padding: 0.625rem;
        font-size: 0.9rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .collab-frontend {
        color: #e2e8f0;
    }
    
    .collab-card {
        background: #1e293b;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .collab-card-header,
    .collab-card-footer {
        background: #334155;
        border-color: #475569;
    }
    
    .collab-form-input,
    .collab-form-textarea,
    .collab-form-select {
        background: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }
    
    .collab-table {
        background: #1e293b;
    }
    
    .collab-table th {
        background: #334155;
        color: #cbd5e1;
    }
    
    .collab-table tr:hover {
        background: #334155;
    }
    
    .collab-modal-content {
        background: #1e293b;
    }
    
    .collab-notification {
        background: #1e293b;
        color: #e2e8f0;
    }
}

/* Print Styles */
@media print {
    .collab-btn,
    .collab-notification,
    .collab-modal {
        display: none !important;
    }
    
    .collab-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .collab-table {
        box-shadow: none;
    }
}

