/* Drone Groups Management - Frontend Styles */
    
			h

.drone-client-materials,
.drone-client-messages {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Group Header */


.group-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.3;
}

/* Material Cards Grid */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.material-card {
    background: white;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #007cba;
}

.material-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1;
}

/* Link Type Icons */
.link-type-icon {
    font-size: 32px;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1;
    display: block;
}

.link-type-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-bottom: 5px;
    font-weight: 500;
}

.material-content {
    flex: 1;
}

.material-content h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    line-height: 1.4;
}

.material-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.material-meta div {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.material-description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    flex: 1;
}

/* URL Display in Material Cards */
.material-url {
    display: block;
    margin-top: 8px;
    padding: 6px 10px;
    background: #f0f7ff;
    border-radius: 4px;
    border: 1px solid #d1e9ff;
    font-size: 12px;
    color: #007cba;
    word-break: break-all;
    line-height: 1.4;
}

.material-url-icon {
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
}

.material-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.material-actions .button {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.material-actions .button:hover {
    background: #005a87;
    color: white;
}

/* Message Cards */
.message-card {
    background: white;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.message-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e2e4e7;
    cursor: pointer;
    transition: background 0.3s ease;
    box-sizing: border-box;
}

.message-header:hover {
    background: #f0f6fc;
}

.message-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}

.message-title {
    flex: 1;
    min-width: 0;
}

.message-title h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.group-name {
    font-weight: 600;
}

.message-content {
    padding: 20px;
    display: none;
    background: white;
    box-sizing: border-box;
}

.message-content.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.message-footer {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e2e4e7;
    text-align: right;
    box-sizing: border-box;
}

/* Filters */
.materials-filters,
.messages-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e4e7;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-select,
.filter-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    height: 40px;
}

.filter-select {
    min-width: 150px;
    flex: 1;
}

.filter-input {
    flex: 2;
    min-width: 200px;
}

/* Tables in frontend */
.drone-client-materials table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.drone-client-materials th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
    font-weight: 600;
}

.drone-client-materials td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
    font-size: 14px;
}

/* Link icon in table */
.link-icon-cell {
    text-align: center;
}

.link-icon-cell .link-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 3px;
}

.link-icon-cell .link-type {
    font-size: 11px;
    color: #666;
    display: block;
    font-weight: 500;
}

.drone-client-materials tr:hover {
    background: #f8f9fa;
}

/* Group selector */
.group-selector {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.group-selector label {
    font-weight: 600;
    white-space: nowrap;
}

.group-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
    box-sizing: border-box;
    height: 40px;
}

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

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

.material-card {
    animation: slideDown 0.3s ease;
}

/* Loading States */
.loading {
    position: relative;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin: 20px 0;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
    line-height: 1;
}

.empty-state h3 {
    color: #6c757d;
    margin-bottom: 10px;
    font-size: 20px;
}

.empty-state p {
    color: #6c757d;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Badges */
.access-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
}

.access-all {
    background: #d4edda;
    color: #155724;
}

.access-selected {
    background: #fff3cd;
    color: #856404;
}

.access-instructor {
    background: #d1ecf1;
    color: #0c5460;
}

/* Mobile-first Responsive Design */
@media (max-width: 1200px) {
    .drone-client-materials,
    .drone-client-messages {
        padding: 15px;
    }
    
    .materials-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .group-header {
        padding: 15px;
    }
    
    .group-header h3 {
        font-size: 20px;
    }
    
    .materials-filters,
    .messages-filters {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .materials-grid {
        grid-template-columns: 1fr;
    }
    
    .material-actions {
        flex-direction: column;
    }
    
    .material-actions .button {
        width: 100%;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select,
    .filter-input {
        width: 100%;
        min-width: 100%;
        margin-bottom: 8px;
    }
    
    .group-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .group-selector select {
        width: 100%;
        min-width: 100%;
    }
    
    /* Hide some table columns on mobile */
    .drone-client-materials th:nth-child(4),
    .drone-client-materials td:nth-child(4),
    .drone-client-materials th:nth-child(5),
    .drone-client-materials td:nth-child(5) {
        display: none;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .message-icon {
        margin-right: 0;
        align-self: center;
    }
    
    .message-title h3 {
        font-size: 15px;
    }
    
    .message-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 576px) {
    .drone-client-materials,
    .drone-client-messages {
        padding: 10px;
    }
    
    .group-header {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .group-header h3 {
        font-size: 18px;
    }
    
    .material-card {
        padding: 15px;
    }
    
    .material-content h4 {
        font-size: 16px;
    }
    
    .message-header {
        padding: 12px;
    }
    
    .message-content {
        padding: 15px;
    }
    
    /* Hide more columns on very small screens */
    .drone-client-materials th:nth-child(3),
    .drone-client-materials td:nth-child(3) {
        display: none;
    }
    
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-state-icon {
        font-size: 36px;
    }
    
    .empty-state h3 {
        font-size: 18px;
    }
}

/* Print styles */
@media print {
    .filter-container,
    .group-selector,
    .material-actions,
    .message-header {
        display: none;
    }
    
    .material-card,
    .message-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .drone-client-materials table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .material-card,
    .message-card,
    .drone-client-materials table {
        border: 2px solid #000;
    }
    
    .material-actions .button,
    .group-header {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .material-card,
    .message-card,
    .material-actions .button {
        transition: none;
    }
    
    .material-card:hover {
        transform: none;
    }
    
    @keyframes fadeIn,
    @keyframes slideDown,
    @keyframes spin {
        animation: none;
    }
}