/* Secure Files Manager - Frontend Styles (usando Bootstrap Italia theme) */

/* ============================================
   Password Form Styles
   ============================================ */

.sfm-frontend-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.sfm-password-form-wrapper {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sfm-password-form-wrapper h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.sfm-form-description {
    color: #666;
    margin: 0 0 25px 0;
    font-size: 14px;
}

.sfm-form-group {
    margin-bottom: 15px;
}

.sfm-password-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.sfm-password-input:focus {
    outline: none;
    border-color: #0073aa;
}

.sfm-password-submit {
    width: 100%;
    padding: 12px 15px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.sfm-password-submit:hover:not(:disabled) {
    background: #005a87;
}

.sfm-password-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.sfm-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

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

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

/* ============================================
   Authenticated User Area Styles
   ============================================ */

.sfm-authenticated-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f0f8ff;
    border: 1px solid #cce5ff;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.sfm-access-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sfm-access-badge {
    background: #28a745;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.sfm-area-names {
    color: #0066cc;
    font-size: 14px;
    font-weight: 500;
}

.sfm-logout-btn {
    padding: 8px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.sfm-logout-btn:hover:not(:disabled) {
    background: #c82333;
}

.sfm-logout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.sfm-files-title {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
}

.sfm-empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* File Actions - minimal styling, using theme classes */
.sfm-file-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sfm-already-authenticated {
    text-align: center;
    padding: 40px 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
}

.sfm-already-authenticated p {
    margin: 0 0 15px 0;
    color: #155724;
    font-size: 18px;
    font-weight: 500;
}

/* ============================================
   List View Table Styles
   ============================================ */

.sfm-list-view .sfm-files-table {
    background: #fff;
    margin-top: 20px;
}

.sfm-list-view .sfm-files-table thead {
    background: #f8f9fa;
}

.sfm-list-view .sfm-files-table thead th {
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
}

.sfm-list-view .sfm-files-table tbody td {
    padding: 8px 12px;
    vertical-align: middle;
    font-size: 14px;
    border-bottom: 1px solid #dee2e6;
}

.sfm-list-view .sfm-files-table tbody tr {
    transition: background-color 0.2s;
}

.sfm-list-view .sfm-files-table tbody tr:hover {
    background-color: #f8f9fa;
}

.sfm-list-view .text-muted {
    color: #6c757d;
    font-size: 12px;
}

.sfm-list-view .btn-group-sm .btn {
    padding: 4px 8px;
    font-size: 12px;
}

.sfm-list-view .icon-xs {
    width: 16px;
    height: 16px;
}

/* Make table responsive */
.sfm-list-view .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 768px) {
    .sfm-authenticated-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sfm-logout-btn {
        width: 100%;
    }
    
    .sfm-file-actions {
        flex-direction: column;
    }
    
    .sfm-file-actions .btn {
        width: 100%;
    }
    
    /* List view adjustments for mobile */
    .sfm-list-view .sfm-files-table {
        font-size: 12px;
    }
    
    .sfm-list-view .sfm-files-table thead th,
    .sfm-list-view .sfm-files-table tbody td {
        padding: 6px 8px;
    }
    
    .sfm-list-view .sfm-files-table thead th {
        font-size: 11px;
    }
}