/* Office-Warehouse File Sharing Styles */

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #10b981;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

.ow-file-sharing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Access Denied */
.ow-access-denied {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 40px auto;
    max-width: 500px;
}

.ow-access-denied p {
    color: var(--danger-color);
    font-size: 18px;
    font-weight: 500;
}

/* Card Styles */
.ow-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

.ow-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Title */
.ow-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ow-icon {
    font-size: 28px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Upload Form */
.ow-upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ow-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ow-form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

/* File Input */
.ow-file-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--background);
}

.ow-file-label:hover {
    border-color: var(--primary-color);
    background: #eef2ff;
}

.ow-file-label input[type="file"] {
    display: none;
}

.ow-file-icon {
    font-size: 32px;
}

.ow-file-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

.ow-file-names {
    margin-top: 12px;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    display: none;
}

.ow-file-names.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

.ow-file-names div {
    padding: 6px 0;
    color: var(--text-primary);
    font-size: 14px;
}

/* Textarea */
textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.ow-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.ow-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ow-btn:hover::before {
    width: 300px;
    height: 300px;
}

.ow-btn-primary {
    background: var(--primary-color);
    color: white;
}

.ow-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.ow-btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.ow-btn-secondary:hover {
    background: #475569;
}

.ow-btn-danger {
    background: var(--danger-color);
    color: white;
}

.ow-btn-danger:hover {
    background: var(--danger-hover);
}

.ow-btn-success {
    background: var(--success-color);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.ow-btn-success:hover {
    background: #059669;
}

.ow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ow-btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.ow-btn.loading .ow-btn-text {
    opacity: 0;
}

.ow-btn.loading .ow-btn-loader {
    display: block;
    position: absolute;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Table Styles */
.ow-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.ow-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.ow-table thead {
    background: var(--background);
}

.ow-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.ow-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
}

.ow-table tbody tr {
    transition: background-color 0.2s ease;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ow-table tbody tr:hover {
    background: var(--background);
}

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

.ow-loading-row td {
    text-align: center;
    padding: 40px !important;
    color: var(--text-secondary);
}

.ow-empty-row td {
    text-align: center;
    padding: 40px !important;
    color: var(--text-secondary);
    font-style: italic;
}

/* Loader */
.ow-loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

/* Action Buttons */
.ow-action-buttons {
    display: flex;
    gap: 8px;
}

.ow-btn-icon {
    padding: 8px 12px;
    font-size: 18px;
    min-width: auto;
}

/* Modal */
.ow-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.ow-modal.show {
    display: flex;
}

.ow-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ow-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.ow-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.ow-modal-body {
    padding: 24px;
}

.ow-modal-body p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.ow-modal-footer {
    padding: 20px 24px;
    background: var(--background);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Toast Notification */
.ow-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--text-primary);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.ow-toast.show {
    display: flex;
}

.ow-toast.success {
    background: var(--success-color);
}

.ow-toast.error {
    background: var(--danger-color);
}

.ow-toast::before {
    content: '✓';
    font-size: 24px;
    font-weight: bold;
}

.ow-toast.error::before {
    content: '✕';
}

/* Responsive Design */
@media (max-width: 768px) {
    .ow-card {
        padding: 20px;
    }
    
    .ow-section-title {
        font-size: 20px;
    }
    
    .ow-table {
        font-size: 12px;
    }
    
    .ow-table th,
    .ow-table td {
        padding: 12px 8px;
    }
    
    .ow-action-buttons {
        flex-direction: column;
    }
    
    .ow-toast {
        right: 15px;
        left: 15px;
        bottom: 15px;
    }
    
    .ow-modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* File Name Truncation */
.ow-file-name {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User Badge */
.ow-user-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.ow-user-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

/* Badge for File Count */
.ow-file-count {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

/* Scrollbar Styling */
.ow-table-container::-webkit-scrollbar {
    height: 8px;
}

.ow-table-container::-webkit-scrollbar-track {
    background: var(--background);
}

.ow-table-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.ow-table-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}